Re: [GENERAL] [ADMIN] PostgreSQL - Services delivery query ?

2007-11-16 Thread Joshua D. Drake
tion / pricing available 4. Most importantly are we supporting any customer in APAC on this ? Is tehre a referal ? Why are you asking PostgreSQL about this? These are questions for Sun. Joshua D. Drake Appreciate your help. regards, Jeba ---(end of broad

Re: [GENERAL] Primary Key

2007-11-16 Thread Joshua D. Drake
ook things too far and wanted something artificial back in my When that is needed I do this: create table foo(id serial unique, a text, b text, primary (a,b)); Joshua D. Drake > life. I'm back to almost never using natural keys now, mainly because > interfacing with the outside worl

Re: [GENERAL] Primary Key

2007-11-16 Thread Joshua D. Drake
; Fie on you evil synthetic key lovers. Long live the Natural Key! Right with you there buddy. Let's get the pitchforks! Joshua D. Drake > > - -- > Ron Johnson, Jr. > Jefferson LA USA > > %SYSTEM-F-FISH, my hovercraft is full of eels > -BEGIN PGP SIGNATUR

Re: [GENERAL] Postgresql and resource isolation

2007-11-16 Thread Joshua D. Drake
nd what that process is doing. I can get that now between the statistics collection of PostgreSQL and the standard operating system tools already provided to me. Sincerely, Joshua D. Drake > > Thanks! > > > ---(end of > broadcast)---

Re: [GENERAL] "field doesn't exist" even though I'm sure it does

2007-11-16 Thread Joshua D. Drake
g all lowercase column names so that I'm not faced > with this problem. > > Thank you for your reply, and you too Joshua. Sorry for such an easy > question :-) No sweat :)... I trust you will have more. Bring them on. Joshua D. Drake > > Sam > > > >

Re: [GENERAL] "field doesn't exist" even though I'm sure it does

2007-11-16 Thread Joshua D. Drake
it isn't isactive it is "isActive". E.g; case is relevant. Joshua D. Drake > Thomas R. Hart II > [EMAIL PROTECTED] > > ---(end of > broadcast)--- TIP 9: In versions below 8.0, > the planner will ignore your

Re: [GENERAL] view management

2007-11-16 Thread Joshua D. Drake
; view. What a PITA. How do others manage this? I use stored procedures instead. Joshua D. Drake > > TIA. > Ed > > ---(end of > broadcast)--- TIP 9: In versions below 8.0, > the planner will ignore your desire to choose

Re: [GENERAL] Primary Key

2007-11-16 Thread Joshua D. Drake
o create one with 6 fields, is much? > > Normally a primary key would just be a single column. Uhmm no. Normally a primary key is defined by the number of columns it takes to determine naturally distinct values. I would agree that if he is looking at 6 then he probably needs to normalize furth

[GENERAL] pg_dump not including custom CAST?

2007-11-16 Thread D. Dante Lorenso
All, I did this in my database: CREATE CAST (VARCHAR AS BYTEA) WITHOUT FUNCTION; But when I use pg_dump to dump the database and use pg_restore to bring it back on a freshly created database, the CAST is the only part of the restore which is missing. I'm using PostgreSQL 8.2.4 for both th

[GENERAL] PostgreSQL Conference 08 East!

2007-11-19 Thread Joshua D. Drake
rofit, and will be used for PostgreSQL development, support and advocacy. So if you are on the east coast and can help with organizing this conference please let me know. Sincerely, Joshua D. Drake - -- === The PostgreSQL Company: Command Prompt, Inc. === Sales/Support: +1.503.667.4564

Re: [pgsql-advocacy] [GENERAL] PostgreSQL Conference 08 East!

2007-11-20 Thread Joshua D. Drake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Tue, 20 Nov 2007 10:49:25 -0500 Walter Vaughan <[EMAIL PROTECTED]> wrote: > Joshua D. Drake wrote: > > > It's that time, after a wildly successful conference last October in > > Portland, Oregon we are now beginning

Re: [GENERAL] [pgsql-advocacy] PostgreSQL Conference 08 East!

2007-11-20 Thread Joshua D. Drake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Tue, 20 Nov 2007 11:50:03 +0300 (MSK) Oleg Bartunov <[EMAIL PROTECTED]> wrote: > Are there any possibilities to sponsor me and Teodor ? I will contact off list about this. Joshua D. Drake - -- === The PostgreSQL Company

Re: [GENERAL] PostgreSQL Conference 08 East!

2007-11-20 Thread Joshua D. Drake
ities are not 100% confirmed, we have been talking about the hotel idea. More to come after Thanksgiving. Joshua D. Drake > > -- > Walter > > > ---(end of > broadcast)--- TIP 4: Have you searched our > list arch

[GENERAL] PostgreSQL 8.3 Beta3 released!

2007-11-20 Thread Joshua D. Drake
nd Solaris should be available soon. Joshua D. Drake PostgreSQL Liaison -- PostgreSQL - The world's most advanced open source database http://www.postgresql.org/ ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [GENERAL] Read-only availability of a standby server?

2007-11-21 Thread Joshua D. Drake
re in Oracle 11 and it is very important for a project I am > working on. > There was a Google Summer of Code project IIRC for that... So yes, it has been worked on a bit but I am unaware of the status. Joshua D. Drake > ---(end of > broadcast)

Re: [GENERAL] POLL: Women-sized t-shirts for PostgreSQL

2007-11-21 Thread Joshua D. Drake
once we get over 30. The main issue with polo's is that they are expensive (comparatively) and thus we need to see a real desire for them. I have deferred the ladies shirts decision to Selena for what I feel are obvious reasons. Sincerely, Joshua D. Drake > > Regards, > Richard Broersma J

Re: [GENERAL] POLL: Women-sized t-shirts for PostgreSQL

2007-11-21 Thread Joshua D. Drake
reSQL is and how it can be used. I personally wouldn't even mind having a PG polo that has 3rd part vendor logos on the sleeves if that would help make PG polo shirts available. O.k., o.k. :) I will look into costs. Joshua D. Drake Regards, Richard Broersma Jr. -

Re: [GENERAL] POLL: Women-sized t-shirts for PostgreSQL

2007-11-21 Thread Joshua D. Drake
brian wrote: Joshua D. Drake wrote: We have considered getting Polos as well as normal shirts. The normal shirts are your basic 6.1 oz 100% cotton. No iron required, heavy enough to hide the extra we all get once we get over 30. The main issue with polo's is that they are expe

Re: [GENERAL] POLL: Women-sized t-shirts for PostgreSQL

2007-11-21 Thread Joshua D. Drake
Paul Lambert wrote: Joshua D. Drake wrote: We do not yet have a "store" although it has been something of interest in the past. We usually order them in bulk and then request donations for them at the conferences and shows. Note :) If you register for East you get a shirt.

Re: [GENERAL] replication in Postgres

2007-11-26 Thread Joshua D. Drake
hen run a third node explicitly for use with drdbd which is synchronous block level replication. No license fees :) Sincerely, Joshua D. Drake Jeff ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://arc

Re: [GENERAL] Primary Key

2007-11-26 Thread Joshua D. Drake
erally at a very inopportune time in the development > process, to be not-so-natural after all. In "theory" the item that would be a natural key in this instance is the VIN. You would of course have to make some kind of allowance for cars that don't have a VIN (nothing in the last w

Re: [GENERAL] Primary Key

2007-11-26 Thread Joshua D. Drake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Mon, 26 Nov 2007 10:28:03 -0800 (PST) Richard Broersma Jr <[EMAIL PROTECTED]> wrote: > --- On Mon, 11/26/07, Joshua D. Drake <[EMAIL PROTECTED]> wrote: > > > In "theory" the item that would be a natural key &g

Re: [GENERAL] replication in Postgres

2007-11-26 Thread Joshua D. Drake
s like the way > > to > > > go if we want good replication. > > > > Sorry, this makes no sense to me -- EnterpriseDB has no replication > > solution that I know of. > > > > This is bullsh*t, it does as I've been talking to the

Re: [GENERAL] replication in Postgres

2007-11-26 Thread Joshua D. Drake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Mon, 26 Nov 2007 12:39:42 -0500 Chris Browne <[EMAIL PROTECTED]> wrote: > Unfortunately, the only way to make things deterministic (or to get > from "near real time" to "*GUARANTEED* real time") is to jump to > synchronous replication, which is no

Re: [GENERAL] Linux v.s. Mac OS-X Performance

2007-11-27 Thread Joshua D. Drake
sion 10, which means... Mach... which is entirely different than say FreeBSD at the kernel level. Joshua D. Drake > - -- === The PostgreSQL Company: Command Prompt, Inc. === Sales/Support: +1.503.667.4564 24x7/Emergency: +1.800.492.2240 PostgreSQL solutions since 1997 http://www.c

Re: [GENERAL] Select all fields except one

2007-11-28 Thread Joshua D. Drake
ly try to be helpful, you could consider using a server side function instead: select * from global_query({},TEXT); Where the array list is is the list of fields you don't want selected and the second parameter is the table you are going to use. Then you just have to build the logic insi

Re: [GENERAL] Linux v.s. Mac OS-X Performance

2007-11-28 Thread Joshua D. Drake
bit overblown. Just how often do you see threads from a > single process get contiguous access to the CPU? I thought it was more about the cost to fork() a process in win32? Sincerely, Joshua D. Drake - -- === The PostgreSQL Company: Command Prompt, Inc. === Sales/Support: +1.503.

Re: [GENERAL] Select all fields except one

2007-11-28 Thread Joshua D. Drake
I would note that I use self modifying code all the time with partitioning and there is *nothing* wrong with that. It calls "dynamic". Sincerely, Joshua D. Drake > > Cheers, > David. - -- === The PostgreSQL Company: Command Prompt, Inc. === Sale

Re: [GENERAL] hibernate + postgresql ?

2007-11-29 Thread Joshua D. Drake
oduce very usable code but then you have to wonder why you have hibernate there at all. Sincerely, Joshua D. Drake Regards, Oleg _ Oleg Bartunov, Research Scientist, Head of AstroNet (www.astronet.ru), Sternberg Astrono

Re: [GENERAL] HD is flooded by Error Log info

2007-11-29 Thread Joshua D. Drake
ilding > the lily, except with pyrites). The only argument I have ever heard that seemed like a realistic issue with using logrotate or syslog was tgl's. You can loose data in the log when rotating if you aren't using the PostgreSQL logging facility. Other than that I thi

Re: [GENERAL] power failure....

2007-12-01 Thread Joshua D. Drake
gt; hiding somewhere? I don't recall if it is in contrib or not.. try?: apt-file is your friend: apt-file search pg_resetxlog /usr/lib/postgresql/8.1/bin/pg_resetxlog Joshua D. Drake > > ---(end of > broadcast)--- TIP 5: don&

Re: [GENERAL] power failure....

2007-12-01 Thread Joshua D. Drake
On Sat, 01 Dec 2007 15:32:50 -0500 Tom Allison <[EMAIL PROTECTED]> wrote: > I tracked it down and did a reset. > I only have one large table right now. > > And now I've decided to start using fsync=on!!! :) change wal_sync_method to open_sync and fsync=on isn't nearly as bad as it sounds. josh

Re: [GENERAL] CPU

2007-12-03 Thread Joshua D. Drake
between a dual core opteron and a dual core xeon will likely not be noticeable to a PostgreSQL installation (generally speaking). However, the two extra cores (even if slower), will greatly help if you have any kind of concurrency. Sincerely, Joshua D. Drake ---(end

Re: [GENERAL] CPU

2007-12-03 Thread Joshua D. Drake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Mon, 03 Dec 2007 22:30:58 -0600 Ron Johnson <[EMAIL PROTECTED]> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 12/03/07 21:27, Joshua D. Drake wrote: > > Uwe C. Schroeder wrote: > >> On Monday 03

Re: [GENERAL] Can i Force to postgrsql to use a certain index?

2007-12-04 Thread Joshua D. Drake
you to do that. Not to mention, a SELECT * without a where clause will always scan the whole table so an Index would be useless. Joshua D. Drake thanks pau -- Pau Marc Muñoz Torres Laboratori de Biologia Computacional Institut de Biotecnologia i Biomedicina Vicent Villar

[GENERAL] PostgreSQL Beta4 released

2007-12-04 Thread Joshua D. Drake
defense to help us find any "corner cases" of possible issues. Further Beta information is available here: http://www.postgresql.org/developer/beta Binaries for are already available for our major platforms. Joshua D. Drake PostgreSQL Liaison -- * PostgreSQL - The world's most advan

Re: [GENERAL] PostgreSQL Beta4 released

2007-12-04 Thread Joshua D. Drake
On Tue, 4 Dec 2007 13:59:13 -0800 "Joshua D. Drake" <[EMAIL PROTECTED]> wrote: > > Thanks to all the testing, feedback and bug reports the community has > performed with the current betas, we now have our fourth beta > of 8.4. Pardon. I am living 12 months in the fut

Re: [GENERAL] pg_dump and server responsiveness

2007-12-05 Thread Joshua D. Drake
oesn't look like an I/O problem as far as I can tell... Pg_dump uses Access Share if I recall. You can operate normally while running pg_dump. I am having a hard time parsing that. Could you instead go over to pgsql.privatepaste.com and send back a paste link? Joshua D. Drake sdb:

Re: [GENERAL] pgAccess for PostgreSQL 8.2.5

2007-12-05 Thread Joshua D. Drake
> editing tables in GUI? pgAccess is long dead. Please take a look at pgadmin, www.pgadmin.org. Alternatively you could use OOBase from OpenOffice. Joshua D. Drake > Thank you. > > Kandy > > ---(end of > broadcast)--- TIP 9: In v

Re: [GENERAL] 7.4 end of life

2007-12-05 Thread Joshua D. Drake
Chris Velevitch wrote: Where can I find information on when support for 7.4.x formally cease? This has yet to be determined. However you can expect that it will be considered in the next 12 to 18 months. We are about to EOL 7.3. Sincerely, Joshua D. Drake Chris

Re: [GENERAL] Array index not used for query on first element?

2007-12-07 Thread John D. Burger
Tom Lane wrote: It seemed reasonable to me that a select on the first element of an array column could use an index on the column, but, as seen in this example, I can't get it to do so: Nope. The operators that go along with a btree index are equality, less than, etc on the whole indexed colu

[GENERAL] How to EXPLAIN statements inside a trigger function?

2007-12-07 Thread John D. Burger
I'm developing some triggers for the first time, and I'm having trouble analyzing their performance. Does anyone have any advice for doing EXPLAIN and the like on statements involving NEW? For instance, I'd like to know what plan PG is coming up with for this fragment of a trigger functio

Re: [GENERAL] record-based log shipping

2007-12-08 Thread Joshua D. Drake
ng, this is how Replicator already does replication (www.commandprompt.com). Inserts replication transactional data, where updates and deletes replicate the low level command (what was deleted/updated not the actual DML). Joshua D. Drake P.S. DDL is never a subject for replication (in

Re: [GENERAL] SQL design pattern for a delta trigger?

2007-12-08 Thread John D. Burger
So two design patterns for a makeshift UPSERT have been presented - one is to check beforehand, and only insert if the item isn't present already, the other is to do the insert blindly and let PG check for you, and catch any exceptions. I'm also wondering what people's ideas are for a sort

Re: [GENERAL] Re-partitioning huge schema

2007-12-07 Thread Joshua D. Drake
fully soon) > I am in the process of a couple of prototype deployments for this. It is very, very cool. I particularly like the ability to define which nodes particular functions will be run on allowing you to have a centralized master for your connect manager that can interact with any

[GENERAL] Array index not used for query on first element?

2007-12-07 Thread John D. Burger
It seemed reasonable to me that a select on the first element of an array column could use an index on the column, but, as seen in this example, I can't get it to do so: => create temp table tempPaths (path int[] primary key); NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "

Re: [GENERAL] slony question

2007-12-10 Thread Joshua D. Drake
tions on Slony please see the slony lists: http://lists.slony.info/mailman/listinfo Sincerely, Joshua D. Drake > Thanks > josh - -- === The PostgreSQL Company: Command Prompt, Inc. === Sales/Support: +1.503.667.4564 24x7/Emergency: +1.800.492.2240 PostgreSQL solutions since 199

Re: [GENERAL] Hijack!

2007-12-11 Thread Joshua D. Drake
t; the list information page, otherwise how is anyone to know? Because it is standard practice on the internet to have lists-headers? And that is how every standard mail client deals with it? Joshua D. Drake - -- The PostgreSQL Company: Since 1997, http://www.commandprompt.com/ Sales/Sup

Re: [GENERAL] Hijack!

2007-12-11 Thread Joshua D. Drake
frankly it is almost 2008. If you are still a top poster, you obviously don't care about the people's content that you are replying to, to have enough wits to not top post. However, I would also note that in "windows" world, it is very common to top post. I am constantly retrai

Re: [GENERAL] psql batch file question

2007-12-11 Thread Joshua D. Drake
the batch file does one of two > things, jumps to a line that has a command to export a table from > PostgreSQL, or calls another batch file, which copies some files. Use perl, python, mono/c#, java, pl/sh ... you have a wealth of various easy to use APIs :) Joshua D. Drake -

Re: top posting (was: [GENERAL] Hijack!)

2007-12-11 Thread Joshua D. Drake
te that but regardless of various "opinions" (mine included). It is the PostgreSQL communities decision and I believe except for newbies and a few long timers who should know better, everyone avoids top posting. Top posting makes it hard to read. Sincerely, Joshua D. Drake - -- The

Re: [GENERAL] top posting

2007-12-11 Thread Joshua D. Drake
he community is being dumb (just read some of my threads ;)) but on this one, I have to agree. We should discourage top posting, vehemently if needed. Sincerely, Joshua D. Drake - -- The PostgreSQL Company: Since 1997, http://www.commandprompt.com/ Sales/Support: +1.503.667.4564 24x7/Emerg

Re: [GENERAL] Hijack!

2007-12-11 Thread Joshua D. Drake
re out what you are having issues with, I will likely ignore that email. As will a great many of the most qualified people that are here to help you. > > And for those who really care, email etiquette in painful detail here > <http://tools.ietf.org/html/rfc1855>. Hijacking

Re: [GENERAL] Hijack!

2007-12-11 Thread Joshua D. Drake
e intended recipient, please contact the sender by reply > > e-mail and destroy all copies of the original message. > > FWIW this would be another item on the netiquette FAQ. O.k. but the above is *not* user controlled. I think the community needs to suck it up and live

Re: [GENERAL] Version Upgrade using WAL files ?

2007-12-11 Thread Joshua D. Drake
version I can use these WAL? No. Take a look at www.slony.info. Joshua D. Drake Thanks Never miss a thing. Make Yahoo your homepage. <http://us.rd.yahoo.com/evt=51438/*http://www.yahoo.com/r

Re: [GENERAL] top posting

2007-12-11 Thread Joshua D. Drake
d, get over it. You obviously haven't been here very long. Sincerely, Joshua D. Drake ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [GENERAL] top posting

2007-12-11 Thread John D. Burger
Quoting the text to which you are responding is often the only way to provide the necessary specific context for your comments. As an illustration, which helps you understand the preceding paragraph better, the extract above, or the mess below? - John D. Burger MITRE On Dec 11, 2007, at 11:54,

Re: [GENERAL] top posting

2007-12-11 Thread John D. Burger
ot;Do you prefer the good x above, or the bad x below?". It's a fair cop (but society's to blame :). Sorry, I thought better of it right after I hit Send. - John D. Burger MITRE ---(end of broadcast)--- TIP 4: Have you search

Re: [GENERAL] top posting

2007-12-11 Thread Joshua D. Drake
simply grow, and it simply is not the way it's done on this list. Get use to it. Now who's doing the 4 year old crying?? There is no reason for this discussion to become rude. It has been productive on both sides thus far. Let's keep it that way. Sincerely, Joshua D. Drake

[GENERAL] Slow PITR restore

2007-12-11 Thread Joshua D. Drake
nsactions an hour without so much as having to stretch first. It seems to me that this machine should be *cranking* through these transactions. Am I just being my usual uptight, impatient self? Sincerely, Joshua D. Drake ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match

[GENERAL] Function to convert from TEXT to BYTEA?

2007-12-11 Thread D. Dante Lorenso
All, I want to use the ENCRYPT and DECRYPT functions from contrib, but they require inputs of BYTEA. My data is in VARCHAR and TEXT fields and when I try to use the contrib functions, they complain about wrong datatypes. Is there a string function or something that will take a VARCHAR or TE

Re: [GENERAL] Slow PITR restore

2007-12-11 Thread Joshua D. Drake
Tom Lane wrote: "Joshua D. Drake" <[EMAIL PROTECTED]> writes: ... Now I understand that restoring log files can be slow but this is a big machine. Yeah, restoring is known to be less than speedy, because essentially zero optimization work has been done on it. Heikki has im

Re: [GENERAL] Slow PITR restore

2007-12-12 Thread Joshua D. Drake
Simon Riggs wrote: On Tue, 2007-12-11 at 22:21 -0500, Tom Lane wrote: "Joshua D. Drake" <[EMAIL PROTECTED]> writes: ... Now I understand that restoring log files can be slow but this is a big machine. Yeah, restoring is known to be less than speedy, because essentially zero o

Re: [GENERAL] Southern California Linux Expo

2007-12-12 Thread Joshua D. Drake
Richard Broersma Jr wrote: Are there any planes in the works for a booth and talks for PostgreSQL? This is already being discussed on the advocacy list :) Joshua D. Drake Regards, Richard Broersma Jr. ---(end of broadcast)--- TIP 1: if

Re: [GENERAL] Slow PITR restore

2007-12-12 Thread Joshua D. Drake
Simon Riggs wrote: On Wed, 2007-12-12 at 07:36 -0800, Joshua D. Drake wrote: We can't really expect people to use PITR if they new it would take hours to recover even on the size of machine I was working on. That's not true statement in all cases and can often be improved

Re: [GENERAL] slony1 replication question

2007-12-12 Thread Joshua D. Drake
SHARMILA JOTHIRAJAH wrote: Hi, I need some help with slony... Which comes from the Slony lists: http://lists.slony.info/mailman/listinfo Sincerely, Joshua D. Drake ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will

Re: [GENERAL] General Q's

2007-12-12 Thread Joshua D. Drake
Dave Page wrote: Joshua D. Drake wrote: * Is there a project to create MySQL compatibility for Postgresql? I No. Thank god. Just think of all those potential customers you could be missing JD :-) http://pgfoundry.org/projects/mysqlcompat/ I know you put a smiley face there but

Re: [GENERAL] General Q's

2007-12-12 Thread Joshua D. Drake
ype of functionality found on Joomla and Drupal work with Postgresql? Those are the two I know best. We have several extremely high profile customers that use Drupal & PostgreSQL with great success. Joshua D. Drake ---(end of broadcast)--- TIP 2: D

Re: [GENERAL] Slow PITR restore

2007-12-12 Thread Joshua D. Drake
g_standby and pushing logs at smaller intervals). Sincerely, Joshua D. Drake regards, tom lane ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [GENERAL] Slow PITR restore

2007-12-12 Thread Joshua D. Drake
Five minutes of transactions is nothing (speaking generally).. In short, if we are in recovery, and we are not saturated the I/O and at least a single CPU, there is a huge amount of optimization *somewhere* to be done. Tom is also correct, we should test this on 8.3. Joshua D. Drake

Re: [GENERAL] Function to convert from TEXT to BYTEA?

2007-12-12 Thread D. Dante Lorenso
Richard Huxton wrote: D. Dante Lorenso wrote: I want to use the ENCRYPT and DECRYPT functions from contrib, but they require inputs of BYTEA. My data is in VARCHAR and TEXT fields and when I try to use the contrib functions, they complain about wrong datatypes. Is there a string function

Re: [GENERAL] Slow PITR restore

2007-12-12 Thread Joshua D. Drake
ng as it took to generate t We archive selects? Joshua D. Drake - -- The PostgreSQL Company: Since 1997, http://www.commandprompt.com/ Sales/Support: +1.503.667.4564 24x7/Emergency: +1.800.492.2240 Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate SELECT 'Training',

Re: [GENERAL] Slow PITR restore

2007-12-12 Thread Joshua D. Drake
Gregory Stark wrote: "Joshua D. Drake" <[EMAIL PROTECTED]> writes: On Wed, 12 Dec 2007 18:02:39 + Gregory Stark <[EMAIL PROTECTED]> wrote: I'm not sure what you guys' expectations are, but if you're restoring 5 minutes worth of database traffic in 8

[GENERAL] Extract last 4 characters from string?

2007-12-12 Thread D. Dante Lorenso
All, Getting the first 4 characters from the begining of a string is easy enough: SELECT SUBSTR('ABCDEFGHIJKLMNOP', 1, 4); Returns 'ABCD'. But getting the last 4 characters appears to be a little more work and is ugly: SELECT SUBSTR('ABCDEFGHIJKLMNOP', LENGTH('ABCDEFGHIJKLMNOP') - 3, 4)

Re: [GENERAL] Extract last 4 characters from string?

2007-12-12 Thread D. Dante Lorenso
Rodrigo De León wrote: On Dec 12, 2007 4:11 PM, D. Dante Lorenso <[EMAIL PROTECTED]> wrote: Is there an easy (preferred) method that I'm missing? select substring('ABCDEFGHIJKLMNOP' from '$'); Thanks! Now, since I'd like to see a number in ther

[GENERAL] Need LIMIT and ORDER BY for UPDATE

2007-12-12 Thread D. Dante Lorenso
All, I'd really like to have ORDER BY and LIMIT for UPDATE and DELETE commands. Is this possible? UPDATE invoice i SET reserve_ts = NOW() + '1 hour'::timestamp FROM account a WHERE a.acct_id = i.acct_id AND i.reserve_ts < NOW() AND a.status = 'A' AND i.is_paid IS FALSE ORDER B

Re: [GENERAL] Need LIMIT and ORDER BY for UPDATE

2007-12-12 Thread John D. Burger
D. Dante Lorenso wrote: I'd really like to have ORDER BY and LIMIT for UPDATE and DELETE commands. Is this possible? UPDATE invoice i SET reserve_ts = NOW() + '1 hour'::timestamp FROM account a WHERE a.acct_id = i.acct_id AND i.reserve_ts < NOW() AND a.

Re: [GENERAL] timestamp with time zone

2007-12-12 Thread Joshua D. Drake
- 12:34:56+04 (1 row) ? Sincerely, Joshua D. Drake ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match

Re: [GENERAL] Slow PITR restore

2007-12-12 Thread Joshua D. Drake
Tom Lane wrote: "Joshua D. Drake" <[EMAIL PROTECTED]> writes: Jeff Trout <[EMAIL PROTECTED]> wrote: in this case it was 24hrs of data - about 1500 wal segments. During this time the machine was nearly complete idle and there wasn't very much IO going on (few megs

Re: [GENERAL] Slow PITR restore

2007-12-12 Thread Joshua D. Drake
Tom Lane wrote: "Joshua D. Drake" <[EMAIL PROTECTED]> writes: Tom Lane wrote: You sure about that? I tested CVS HEAD just now, by setting the checkpoint_ parameters really high, ... And: 2007-12-13 00:55:20 EST LOG: restored log file "000107E1006B

Re: [GENERAL] Need LIMIT and ORDER BY for UPDATE

2007-12-13 Thread D. Dante Lorenso
John D. Burger wrote: D. Dante Lorenso wrote: I'd really like to have ORDER BY and LIMIT for UPDATE and DELETE commands. Is this possible? UPDATE invoice i SET reserve_ts = NOW() + '1 hour'::timestamp FROM account a WHERE a.acct_id = i.acct_id AND i.reserve_t

Re: [GENERAL] For the SQL gurus out there

2007-12-13 Thread D. Dante Lorenso
Uwe C. Schroeder wrote: Ok, something I've been toying around with for a while. Here's the scenario: Imagine a blogging app. I have a table for blogs with a blog_id (primary key) and a table blog_comments also with a comment_id as primary key and a foreign key holding the blog_id the post belong

Re: [GENERAL] Need LIMIT and ORDER BY for UPDATE

2007-12-13 Thread D. Dante Lorenso
Bill Moran wrote: "D. Dante Lorenso" <[EMAIL PROTECTED]> wrote: All, I'd really like to have ORDER BY and LIMIT for UPDATE and DELETE commands. Is this possible? UPDATE invoice i SET reserve_ts = NOW() + '1 hour'::timestamp FROM account a WHE

Re: [GENERAL] Better alternative for Primary Key then serial??

2007-12-13 Thread John D. Burger
. It turned out that the natural keys were always positive, so I set up the sequence to range =downward= from 0. - John D. Burger MITRE ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [GENERAL] Need LIMIT and ORDER BY for UPDATE

2007-12-13 Thread John D. Burger
D. Dante Lorenso wrote: Doesn't this create race condition in the query where multiple processes might find the same invoice_id while executing the inner select. The update would then update the same record more than once during the update step and 2 processes might get the

Re: [GENERAL] Slow PITR restore

2007-12-13 Thread Joshua D. Drake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Wed, 12 Dec 2007 23:08:35 -0800 "Joshua D. Drake" <[EMAIL PROTECTED]> wrote: > Tom Lane wrote: > > "Joshua D. Drake" <[EMAIL PROTECTED]> writes: > >> Tom Lane wrote: > >>> Yo

Re: [GENERAL] Need to find out which process is hitting hda

2007-12-16 Thread Joshua D. Drake
> 3287 -/+ buffers/cache:207295 > > Swap: 2527328 2199 > > > > (YEP, I know I'm RAM starved on this machine) > > Good lord, my laptop has more memory than that. :) My phone has more memory than that :P Sincerely, J

[GENERAL] PostgreSQL Conference East Update

2007-12-17 Thread Joshua D. Drake
week and registration opens up in January 08. Sincerely, Joshua D. Drake - -- The PostgreSQL Company: Since 1997, http://www.commandprompt.com/ Sales/Support: +1.503.667.4564 24x7/Emergency: +1.800.492.2240 Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate SELECT

Re: [GENERAL] spreadsheet interface

2007-12-17 Thread Joshua D. Drake
use the OOo spreadsheet to access data > directly. > > I haven't done this, personally, so I can't vouch for how well it > works. Well OpenOffice now has a native sdbc driver so no ODBC is required. It seems to work very well. Joshua D. Drake - -- The PostgreSQL Compan

Re: [GENERAL] install problem

2007-12-17 Thread Joshua D. Drake
gt; rush and we have a number of people world wide who would be using > this once we can actually test it. http://www.postgresql.org/docs/8.2/static/runtime-config-connection.html Sincerely, Joshua D. Drake - -- The PostgreSQL Company: Since 1997, http://www.commandprompt.com/ Sales

Re: [GENERAL] thank you

2007-12-18 Thread Joshua D. Drake
Plus thank you for a database system that's a joy > to work with. > > /Kevin (Although not the same Kevin as above) /me takes note of all the Kevins that are handing out hugs... :) Sincerely, Joshua D. Drake - -- The PostgreSQL Company: Since 1997, http://www.commandpr

Re: [GENERAL] thank you

2007-12-18 Thread Joshua D. Drake
d thus won't have as much opportunity to interact with the PG > community. > > That is until I can convince my new employer to realise the dark side > of Microsoft SQL Server. :) 503-667-4564 extension 101... I am available anytime after 9:00am PST Sincerely, Joshua D. Drake - --

Re: [GENERAL] Password as a command line argument to createuser

2007-12-18 Thread Joshua D. Drake
Jane Ren wrote: Hi, I need to write a script that creates a new user with a password automatically. Is there a way I can specify the password as a command line argument to createuser? Since you have access to the shell use psql -U user -c "create role ..." Joshua D. Drake It

Re: [GENERAL] to realise the dark side of Microsoft SQL Server...?

2007-12-19 Thread Joshua D. Drake
romoting it. 7. the OOXML debacle? The list continues, but I suspect you get my point. You are assuming most people care. 1. You have to pay for the the OS. 2. You have to pay for the database. 3. You have to pay for any "extra" feature. That is where you start

Re: [GENERAL] Machine spec 64-bit/32 GB RAM

2007-12-21 Thread Joshua D. Drake
of PG can the 32 G of RAM be used for caching? There is zero reason not to run PG on 64bit with that configuration. Sincerely, Joshua D. Drake Many thanks, David ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] Warm standby system - FATAL: the database system is starting up

2007-12-21 Thread Joshua D. Drake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Fri, 21 Dec 2007 13:24:01 -0800 (PST) Glyn Astill <[EMAIL PROTECTED]> wrote: > Is there a way I can check what it is? Change your log line prefix to show connections and ip addresses. Joshua D. Drake - -- The PostgreSQL Company: S

Re: [GENERAL] Setting Sequence Values

2007-12-21 Thread Joshua D. Drake
es. Is there an easy way to do > this? Take a look at setval. postgres=# select setval('foo_id_seq',(select max(id) from foo)); setval - 100 (1 row) postgres=# select currval('foo_id_seq'); currval - - 100

Re: [GENERAL] Setting Sequence Values

2007-12-21 Thread Joshua D. Drake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Fri, 21 Dec 2007 18:14:43 -0700 D"Gregory Williamson" <[EMAIL PROTECTED]> wrote: > I think the OP needs a way to do _all_ of the sequences, which can be > a little dauning if you have lots of tables. I'm sure there'

Re: [GENERAL] Setting Sequence Values

2007-12-21 Thread Joshua D. Drake
t > test out entirely, I think --- it doesn't seem essential, because > there isn't any other reason for a sequence to depend on a table > column. Otherwise the query seems correct. 8.2 is type 'a' (and I assume 8.3), 8.1 is 'i'. I don't know about anything o

Re: [GENERAL] default superuser

2007-12-28 Thread Joshua D. Drake
you use? I suggest you look at: http://www.postgresql.org/docs/8.2/static/user-manag.html http://www.postgresql.org/docs/8.2/static/managing-databases.html http://www.postgresql.org/docs/8.2/static/client-authentication.html Sincerely, Joshau D. Drake Thanks -dave

<    1   2   3   4   5   6   7   8   9   10   >