Re: [GENERAL] pg temp tables

2007-03-05 Thread Tom Lane
"Anton Melser" <[EMAIL PROTECTED]> writes: > Thanks for your reply. I am managing a db that has some export scripts > that don't do a drop/create, but rather a delete from at the start of > the proc (6 or 7 tables used for this, and only this). Now given that > there is no vacuuming at all going on

Re: [GENERAL] pg temp tables

2007-03-05 Thread Anton Melser
On 06/03/07, Robert Treat <[EMAIL PROTECTED]> wrote: On Saturday 03 March 2007 10:33, Anton Melser wrote: > Hi, > I have been going around telling everyone that there is no point using > physical tables in postgres for temporary storage within a procedure. > Why bother bothering the system with s

Re: [GENERAL] Database slowness -- my design, hardware, or both?

2007-03-05 Thread Webb Sprague
. Heh. Sure thing. I wasn't sure how much detail to give when initially posting. Looks like enough to get the real experts on the list started :) I will try to look again tommorrow, but I bet other folks have better intuition than me. How much concurrency is there on your database? --

Re: Wikipedia on Postgres (was Re: [GENERAL] postgresql vs mysql)

2007-03-05 Thread Robert Treat
On Friday 23 February 2007 16:43, Chad Wagner wrote: > On 2/23/07, Bill Moran <[EMAIL PROTECTED]> wrote: > > > In any case if anyone is interested I was able to reproduce the changes > > > > that > > > > > wikipgedia made and applied those changes (as well as others) all the > > > > way up > > > >

Re: [GENERAL] Database slowness -- my design, hardware, or both?

2007-03-05 Thread Webb Sprague
Well, I've tried to do massive UPDATEs as much as possible. But the patterns that we're looking for are basically of the variety, "If the user clicks on X and then clicks on Y, but without Z between the two of them, and if these are all part of the same simulation run, then we tag action X as be

Re: [GENERAL] Database slowness -- my design, hardware, or both?

2007-03-05 Thread Reuven M. Lerner
Hi, Tom. You wrote: Hi, everyone. I've been using PostgreSQL for a decade, and it hasn't failed me yet. But I've been having some serious performance problems on a database that I've been using in my grad-school research group, and it's clear that I need help from some more experienced hands

Re: [GENERAL] Database slowness -- my design, hardware, or both?

2007-03-05 Thread Tom Lane
"Reuven M. Lerner" <[EMAIL PROTECTED]> writes: > Hi, everyone. I've been using PostgreSQL for a decade, and it hasn't > failed me yet. But I've been having some serious performance problems > on a database that I've been using in my grad-school research group, and > it's clear that I need help

[GENERAL] (no subject)

2007-03-05 Thread Reuven M. Lerner
---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly

Re: [GENERAL] US Highschool database in postgres

2007-03-05 Thread Robert Treat
On Monday 05 March 2007 08:47, Laurent ROCHE wrote: > You can get some lists from here: > http://www.iso.org/iso/en/prods-services/iso3166ma/index.html > and there > http://www.unece.org/cefact/locode/service/main.htm > > No high schools though, but countries, currencies, cities, states, ... > Not

[GENERAL] Database slowness -- my design, hardware, or both?

2007-03-05 Thread Reuven M. Lerner
Hi, everyone. I've been using PostgreSQL for a decade, and it hasn't failed me yet. But I've been having some serious performance problems on a database that I've been using in my grad-school research group, and it's clear that I need help from some more experienced hands. Basically, we've c

Re: [GENERAL] Support for idempotent schema changes?

2007-03-05 Thread Florian G. Pflug
Joshua D. Drake wrote: David Lowe wrote: Within the context of a script, executing: Begin Statement1 Statement2 Statement3 Commit Where I only wish to commit if the error is specific to the object already existing, and rollback for all other errors, what's the best way to accomplish that? Y

Re: [GENERAL] giving a user permission to kill their processes only

2007-03-05 Thread Robert Treat
On Wednesday 28 February 2007 15:19, George Nychis wrote: > Hey all, > > So the pg_cancel_backend() function by default is only available to super > users, so I decided to write a wrapper function around, use a SECURITY > DEFINER, and GRANT my user privilege to use the wrapper. > > BEGIN; > CREATE

Re: [GENERAL] pg temp tables

2007-03-05 Thread Robert Treat
On Saturday 03 March 2007 10:33, Anton Melser wrote: > Hi, > I have been going around telling everyone that there is no point using > physical tables in postgres for temporary storage within a procedure. > Why bother bothering the system with something which is only used in > one procedure I said t

Re: [GENERAL] Query timing

2007-03-05 Thread Robert Treat
On Monday 05 March 2007 02:38, Naz Gassiep wrote: > That's not quite as fast as I would like to do it, that throws in a few > more steps which slow down the development process. However if there is > no way I will persevere with the method I have now. > Thanks, > - Naz. > There are several logging

Re: [GENERAL] real multi-master replication?

2007-03-05 Thread Robert Treat
On Sunday 04 March 2007 21:28, Bill Moran wrote: > Stefan Kaltenbrunner <[EMAIL PROTECTED]> wrote: > > Bill Moran wrote: > > > Stefan Kaltenbrunner <[EMAIL PROTECTED]> wrote: > > >> Bill Moran wrote: > > >>> "hubert depesz lubaczewski" <[EMAIL PROTECTED]> wrote: > > hi, > > i read about s

Re: [GENERAL] pq_flush: send() failed: Broken pipe

2007-03-05 Thread Tom Lane
Yumiko Izumi <[EMAIL PROTECTED]> writes: > When I carried out SQL sentence in PostgreSQL7.3.8 environment, > PostgreSQL outputs the following error messages. > == > Dec 19 13:50:32 gyomu01 postgres[807]: [11] LOG: pq_flush: send() failed: > Broken pipe > Dec 19 13:50:3

Re: [GENERAL] pq_flush: send() failed: Broken pipe

2007-03-05 Thread Andrej Ricnik-Bay
On 3/6/07, Yumiko Izumi <[EMAIL PROTECTED]> wrote: Hello. Hi, When I carried out SQL sentence in PostgreSQL7.3.8 environment, PostgreSQL outputs the following error messages. Can't say anything sensible regarding the error message, but if you have to carry on using 7.x you should upgrade to a

[GENERAL] pq_flush: send() failed: Broken pipe

2007-03-05 Thread Yumiko Izumi
Hello. When I carried out SQL sentence in PostgreSQL7.3.8 environment, PostgreSQL outputs the following error messages. == Dec 19 13:50:32 gyomu01 postgres[807]: [11] LOG: pq_flush: send() failed: Broken pipe Dec 19 13:50:33 gyomu01 postgres[807]: [12] LOG: pq_recvb

[GENERAL] RFC tool to support development / operations work with slony replicated databases

2007-03-05 Thread Andrew Hammond
Hello All, I've been working on designing a tool to facilitate both developers and operations staff working with slony replicated databases. I think that the problem described below is a general problem for people working with systems that are both in production and under on-going development / m

Re: [GENERAL] M:M table conditional delete for parents

2007-03-05 Thread Omar Eljumaily
I think a foreign key restraint is basically a trigger that throws an exception (RAISE statement) when the restraint is violated. Something trigger function like: If table1 if not in table1 raise else if table2 if not in table2 raise

[GENERAL] M:M table conditional delete for parents

2007-03-05 Thread MargaretGillon
Postgresql 8.1.4 on Redhat 9 I have a table which stores M:M relationships. I can't put foreign keys to the parents of this table because the relationships being stored go to several tables. This was done so that only two fields have to be searched in order for all relationships to be found for

Re: [GENERAL] real multi-master replication?

2007-03-05 Thread hubert depesz lubaczewski
On 3/5/07, Richard Broersma Jr <[EMAIL PROTECTED]> wrote: > but i dont insist on async. if there is multi-master replication for > postgresql it would be great if it would be sync. I don't know it this is what you are looking for, but this new link on the postgresql home page suggests that a new

Re: [GENERAL] real multi-master replication?

2007-03-05 Thread Omar Eljumaily
I don't believe there is, or can be, any asynchronous multi-master replication system for any database that will work with all possible general purpose constructs. I believe it's possible in theory if you have system wide transaction locking, i.e. synchronous. However, if you have to have

Re: [GENERAL] Why don't dumped files parse in pgAdmin3 query editor?

2007-03-05 Thread Magnus Hagander
On Mon, Mar 05, 2007 at 10:58:32AM -0500, [EMAIL PROTECTED] wrote: > Quoting Magnus Hagander <[EMAIL PROTECTED]>: > > >It should work perfectly fine to restore it using psql -f on Windows as > >well, I'd recommend that you look into why that's not working and try to > >fix that instead. > > The m

Re: [GENERAL] Why don't dumped files parse in pgAdmin3 query editor?

2007-03-05 Thread Raymond O'Donnell
On 05/03/2007 15:58, [EMAIL PROTECTED] wrote: The main problem I'm having is that any command I try to use with psql, even psql /?, causes it to prompt me for a password, and it tells me my password is wrong no matter what username/passsword combination I try. Are you using the -U option to co

Re: [GENERAL] Why don't dumped files parse in pgAdmin3 query editor?

2007-03-05 Thread dlivesay
Quoting Magnus Hagander <[EMAIL PROTECTED]>: It should work perfectly fine to restore it using psql -f on Windows as well, I'd recommend that you look into why that's not working and try to fix that instead. The main problem I'm having is that any command I try to use with psql, even psql /?,

Re: [GENERAL] Why don't dumped files parse in pgAdmin3 query editor?

2007-03-05 Thread Joris Dobbelsteen
>-Original Message- >From: [EMAIL PROTECTED] >[mailto:[EMAIL PROTECTED] On Behalf Of >[EMAIL PROTECTED] >Sent: maandag 5 maart 2007 16:28 >To: pgsql-general@postgresql.org >Subject: [GENERAL] Why don't dumped files parse in pgAdmin3 >query editor? > >Here's something I've always wondered

Re: [GENERAL] Why don't dumped files parse in pgAdmin3 query editor?

2007-03-05 Thread Magnus Hagander
On Mon, Mar 05, 2007 at 10:28:04AM -0500, [EMAIL PROTECTED] wrote: > Here's something I've always wondered. When you dump a database, the dumped > file > looks like ordinary SQL, but if I load it into a query editor window and try > to > execute it, I always get syntax errors. The specific errors

Re: [GENERAL] Why don't dumped files parse in pgAdmin3 query editor?

2007-03-05 Thread Raymond O'Donnell
On 05/03/2007 15:28, [EMAIL PROTECTED] wrote: In the past I've just used psql -f [file] [schema] to reload them, but I'm trying to do this on Windows, and I can't seem to get anything to work from the command shell, so I'm really stuck. What happens when you try to do it from the command shell

Re: [GENERAL] Why don't dumped files parse in pgAdmin3 query editor?

2007-03-05 Thread Raymond O'Donnell
On 05/03/2007 15:28, [EMAIL PROTECTED] wrote: Here's something I've always wondered. When you dump a database, the dumped file looks like ordinary SQL, but if I load it into a query editor window and try to execute it, I always get syntax errors. The specific errors vary, but it always makes it

[GENERAL] Why don't dumped files parse in pgAdmin3 query editor?

2007-03-05 Thread dlivesay
Here's something I've always wondered. When you dump a database, the dumped file looks like ordinary SQL, but if I load it into a query editor window and try to execute it, I always get syntax errors. The specific errors vary, but it always makes it impossible to reload the data that way. In the p

Re: [GENERAL] real multi-master replication?

2007-03-05 Thread Richard Broersma Jr
> but i dont insist on async. if there is multi-master replication for > postgresql it would be great if it would be sync. I don't know it this is what you are looking for, but this new link on the postgresql home page suggests that a new version of master-to-master replication is now available.

Re : Re : [GENERAL] COPY form stdin and file

2007-03-05 Thread Laurent ROCHE
COPY FROM stdin works only from a console ... and PGAdmin is not a console but a window environment, so that does not work ! I had the PG Admin explaining the very same things, before. Cheers, [EMAIL PROTECTED] The Computing Froggy - Message d'origine De : Tom Lane <[EMAIL PROTECTED]>

Re: [GENERAL] usage for 'with recursive'?

2007-03-05 Thread Kenneth Downs
hubert depesz lubaczewski wrote: On 3/2/07, Kenneth Downs <[EMAIL PROTECTED]> wrote: This reminds me of another advantage of the WITH RECURSIVE, which is that it pushes to overhead to SELECT, with no associated write-time overheads. hmm .. why do you consider this as advantage? i would say it'

Re : [GENERAL] US Highschool database in postgres

2007-03-05 Thread Laurent ROCHE
You can get some lists from here: http://www.iso.org/iso/en/prods-services/iso3166ma/index.html and there http://www.unece.org/cefact/locode/service/main.htm No high schools though, but countries, currencies, cities, states, ... Not sure whether this will help you ... but you can have a look. If

Re: [GENERAL] date format

2007-03-05 Thread Raymond O'Donnell
On 05/03/2007 12:16, Joshua D. Drake wrote: I didn't really explain my point here. You an use datestyle from a session, or you can reload the server. You do not need to *restart*. Yes, that's what I was getting at as well - I was in a hurry at the time and "restart" was the wrong word to use.

Re: [GENERAL] date format

2007-03-05 Thread Joshua D. Drake
Peter Eisentraut wrote: Am Sonntag, 4. März 2007 17:16 schrieb Raymond O'Donnell: Probably a silly question, but did you remember to restart the server after changing the datestyle setting? You don't need to do that. I didn't really explain my point here. You an use datestyle from a

Re: [GENERAL] plpgsql and insert

2007-03-05 Thread Ben Trewern
Depending on what client side library you are using you could use the RETURNING clause, see the docs: http://www.postgresql.org/docs/8.2/static/sql-insert.html Regards, Ben "Jamie Deppeler" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > > Have a quick question is possible

Re: [GENERAL] date format

2007-03-05 Thread Peter Eisentraut
Am Sonntag, 4. März 2007 17:16 schrieb Raymond O'Donnell: > Probably a silly question, but did you remember to restart the server > after changing the datestyle setting? You don't need to do that. -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(end of br

Re: [GENERAL] COPY form stdin and file

2007-03-05 Thread Richard Huxton
senges wrote: Hi all, when untaring a pg_dumped tar file the data gets populated like this: - COPY mytable (id, attr1, attr2) FROM stdin; \. copy mytable (id, attr1, attr2) from '$$PATH$$/2387.dat' ; - where $$PATH$$ gets replaced by the current path. Anyone kn

Re: [GENERAL] COPY form stdin and file

2007-03-05 Thread Tom Lane
"senges" <[EMAIL PROTECTED]> writes: > when untaring a pg_dumped tar file the data gets populated like this: > - > COPY mytable (id, attr1, attr2) FROM stdin; > \. > copy mytable (id, attr1, attr2) from '$$PATH$$/2387.dat' ; > - Not here ... I only see 'FROM stdin

[GENERAL] COPY form stdin and file

2007-03-05 Thread senges
Hi all, when untaring a pg_dumped tar file the data gets populated like this: - COPY mytable (id, attr1, attr2) FROM stdin; \. copy mytable (id, attr1, attr2) from '$$PATH$$/2387.dat' ; - where $$PATH$$ gets replaced by the current path. Anyone knows whats the ai

Re: [GENERAL] Can I getting a unique ID from a select

2007-03-05 Thread Bruno Wolff III
On Sat, Mar 03, 2007 at 16:46:45 -0800, Timasmith <[EMAIL PROTECTED]> wrote: > On Mar 3, 7:12 pm, [EMAIL PROTECTED] (Bruno Wolff III) wrote: > > On Thu, Mar 01, 2007 at 06:16:02 -0800, > > Timasmith<[EMAIL PROTECTED]> wrote: > > > > > create view myview as > > > select rownum, t1.field, t2.field

Re: [GENERAL] psql client quits after 1st command

2007-03-05 Thread Vincenzo Romano
Good point Tom. I failed to go little deeper in the problem. So the final test for me is that the whole bash script along with its echos is to be globally directed to the pipes. On Friday 02 March 2007 19:43 Tom Lane wrote: > Martijn van Oosterhout writes: > > I don't think you can acheive the

Re: [GENERAL] real multi-master replication?

2007-03-05 Thread hubert depesz lubaczewski
On 3/5/07, Steve Atkins <[EMAIL PROTECTED]> wrote: I don't believe there is, or can be, any asynchronous multi-master replication system for any database that will work with all possible general purpose constructs. but i dont insist on async. if there is multi-master replication for postgresql

Re: [GENERAL] usage for 'with recursive'?

2007-03-05 Thread hubert depesz lubaczewski
On 3/2/07, Kenneth Downs <[EMAIL PROTECTED]> wrote: This reminds me of another advantage of the WITH RECURSIVE, which is that it pushes to overhead to SELECT, with no associated write-time overheads. hmm .. why do you consider this as advantage? i would say it's rather drawback. depesz --

Re: [GENERAL] real multi-master replication?

2007-03-05 Thread hubert depesz lubaczewski
On 3/4/07, Devrim GÜNDÜZ <[EMAIL PROTECTED]> wrote: PGCluster may be the thing that you are looking for. However, if you are looking at something that is similar to Oracle's RAC, it is the PGCluster-II that you are looking for, which is under heavy development right now. i dont know oracle. but

Re: [GENERAL] real multi-master replication?

2007-03-05 Thread hubert depesz lubaczewski
On 3/4/07, Bill Moran <[EMAIL PROTECTED]> wrote: How would you define multi-master? i am able to write to any machine in cluster, and read from any. hopefully - wiithout any kind of "single point of failure" (like pgpool connection point). depesz ---(end of broadcast)-