Re: [GENERAL]

2008-07-17 Thread Pavel Stehule
Hello 2008/7/17 ram subbu [EMAIL PROTECTED]: Hi All, Here i am facing a peculiar scenario. I have a query which always result in 3 rows. There are two columns in the query result. I have to make the result of 3 rows as a one row select * from tab1; col1---col2 --- 1

[GENERAL] Standard binaries compilier - how to know?

2008-07-17 Thread el dorado
Hello! Is there any opportunity to find out what compilier is used to build standard binaries from http://www.postgresql.org/ftp/binary/v8.3.3/win32/ (postgresql-8.3.3-1-binaries-no-installer.zip MSVC or MinGW(gcc)? I have some problems with C-procedures compilation (PG 8.3, WinXP). I've got the

Re: [GENERAL] Standard binaries compilier - how to know?

2008-07-17 Thread Dave Page
2008/7/17 el dorado [EMAIL PROTECTED]: Hello! Is there any opportunity to find out what compilier is used to build standard binaries from http://www.postgresql.org/ftp/binary/v8.3.3/win32/ (postgresql-8.3.3-1-binaries-no-installer.zip MSVC or MinGW(gcc)? I have some problems with

Re: [GENERAL] unable to drop a constraint

2008-07-17 Thread Enrico Sirola
Hello Tom, Il giorno 16/lug/08, alle ore 16:40, Tom Lane ha scritto: Enrico Sirola [EMAIL PROTECTED] writes: I have two tables, one has a field with a foreign key pointing to the primary key of another table. When I to drop the first table, I get the following error: test=# drop table

Re: [GENERAL] unable to drop a constraint

2008-07-17 Thread Enrico Sirola
Hi Michael, Il giorno 16/lug/08, alle ore 18:21, Michael Glaesemann ha scritto: On 2008-07-16, at 7:18 AM, Enrico Sirola wrote: Hi, I'm using postgresql version 8.3.1 I have two tables, one has a field with a foreign key pointing to the primary key of another table. When I to drop the

[GENERAL] Last chance to sign up for PDXPUG Day! You know you want to!

2008-07-17 Thread gabrielle
See! these fabulous talks: http://pugs.postgresql.org/view/pdxpugtalksview Meet! those PDXPUGers you keep hearing about! Enjoy! tasty food beverages at the afterparty! Sign up here: http://spreadsheets.google.com/viewform?key=paoTJ9uEi8vIqumUzwzrCAwemail=true Please sign up for free admission

[GENERAL] query optimization

2008-07-17 Thread Kevin Duffy
Hello: This posting is a follow up to this posting from July 15th. http://archives.postgresql.org/pgsql-general/2008-07/msg00569.php Given the following select statement select sec.* from security sec , positions_gsco where positions_gsco.securitykey is NULL and

[GENERAL] deleting the master but not the detail

2008-07-17 Thread Ismael ....
hi I have one of those master-detail relationships here and I need to be able to delete the master but leave the details untouched But the delete command doesn't let me delete the master as long as there are details referencing it. ON DELETE RESTRICT | NO ACTION won't let me delete the master

Re: [GENERAL] [HACKERS] postmaster.pid not visible

2008-07-17 Thread Decibel!
Moving to -general. -hackers is for discussion about PG development. On Jul 16, 2008, at 1:10 AM, cinu wrote: Hi All, I installed PostgreSQL-8.3.1 on my Suse Linux machine You should upgrade; I'm pretty sure 8.3 is up to 8.3.3 now. , it went on fine without any problems and I was able to

Re: [GENERAL] deleting the master but not the detail

2008-07-17 Thread A. Kretschmer
am Thu, dem 17.07.2008, um 11:11:00 -0500 mailte Ismael folgendes: hi I have one of those master-detail relationships here and I need to be able to delete the master but leave the details untouched But the delete command doesn't let me delete the master as long as there are details

Re: [GENERAL] deleting the master but not the detail

2008-07-17 Thread Raymond O'Donnell
On 17/07/2008 17:11, Ismael wrote: ON DELETE RESTRICT | NO ACTION won't let me delete the master CASCADE | SET NULL | SET DEFAULT will modify the details Can you just drop the constraint that's doing the referential integrity? Ray.

Re: [GENERAL] deleting the master but not the detail

2008-07-17 Thread Ismael ....
So is there no other way to do it but to verify the integrity using triggers and drop the referential constraints? Because I *still* need to verify that NEW records in the details table direct to something that exists ON DELETE RESTRICT | NO ACTION won't let me delete the master CASCADE |

Re: [GENERAL] deleting the master but not the detail

2008-07-17 Thread Douglas McNaught
On Thu, Jul 17, 2008 at 12:11 PM, Ismael [EMAIL PROTECTED] wrote: hi I have one of those master-detail relationships here and I need to be able to delete the master but leave the details untouched Then remove the referential integrity constraint, since it's obviously incompatible with

Re: [GENERAL] query optimization

2008-07-17 Thread Scott Marlowe
What does the output of explain select sec.* ... have to say? -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] deleting the master but not the detail

2008-07-17 Thread Scott Marlowe
On Thu, Jul 17, 2008 at 10:52 AM, Douglas McNaught [EMAIL PROTECTED] wrote: On Thu, Jul 17, 2008 at 12:11 PM, Ismael [EMAIL PROTECTED] wrote: hi I have one of those master-detail relationships here and I need to be able to delete the master but leave the details untouched Then remove

Re: [GENERAL] deleting the master but not the detail

2008-07-17 Thread Ismael ....
It seems like 3 vs 1 so you win :) I'll drop the constraint and verify the integrity of the new records manually tanks On Thu, Jul 17, 2008 at 10:52 AM, Douglas McNaught wrote: On Thu, Jul 17, 2008 at 12:11 PM, Ismael wrote: hi I have one of those master-detail relationships here

[GENERAL] TODO list and hyphen

2008-07-17 Thread Scara Maccai
Hi, I was looking at the TODO: http://www.postgresql.org/docs/faqs.TODO.html A hyphen, -, marks changes that will appear in the upcoming 8.4 release. Well, making a search for the - sign is complicated... it's obviously used for a lot of other things... could you use another character?

Re: [GENERAL] [HACKERS] postmaster.pid not visible

2008-07-17 Thread Tom Lane
Decibel! [EMAIL PROTECTED] writes: Moving to -general. -hackers is for discussion about PG development. On Jul 16, 2008, at 1:10 AM, cinu wrote: Can anyone throw light on why the postmaster.pid was not visible, My guess would be that something went in and removed the .pid file. I was

Re: [GENERAL] deleting the master but not the detail

2008-07-17 Thread Webb Sprague
hi I have one of those master-detail relationships here and I need to be able to delete the master but leave the details untouched when you create the table with an FK constraint, use the ON DELETE SET NULL option, or SET DEFAULT. And read the docs on CREATE TABLE:

Re: [GENERAL] TODO list and hyphen

2008-07-17 Thread salman
-Allow administrators to safely terminate individual sessions either via an SQL function or SIGTERM Can't you already do this with pg_cancel_backend() or kill child pid? Or is this for something else altogether? -salman -- Sent via pgsql-general mailing list

[GENERAL] in query variables....

2008-07-17 Thread Rhys A.D. Stewart
Hi all, this is from the is there a way file. Is there a way to get the name of the relation or relations in a query from within the query? Like some kind of magic variable...? for example : select *, some_magic_variable from thistable where some_magic_variable would be replaced by

Re: [GENERAL] deleting the master but not the detail

2008-07-17 Thread Stephan Szabo
On Thu, 17 Jul 2008, Ismael wrote: So is there no other way to do it but to verify the integrity using triggers and drop the referential constraints? Well, you could do something using a before delete trigger on the referencing table that returns NULL to avoid the delete as well, but

Re: [GENERAL] [HACKERS] postmaster.pid not visible

2008-07-17 Thread Douglas McNaught
On Thu, Jul 17, 2008 at 2:43 PM, Tom Lane [EMAIL PROTECTED] wrote: I was wondering if the postmaster was running in some other data directory than the OP thought. I've never heard of anything just randomly removing a .pid file from a data directory; and it would be extremely dangerous if that

Re: [GENERAL] deleting the master but not the detail

2008-07-17 Thread Ismael ....
So is there no other way to do it but to verify the integrity using triggers and drop the referential constraints? Well, you could do something using a before delete trigger on the referencing table that returns NULL to avoid the delete as well, but making it only prevent the deletions

Re: [GENERAL] in query variables....

2008-07-17 Thread Ismael ....
Hi all, this is from the is there a way file. Is there a way to get the name of the relation or relations in a query from within the query? Like some kind of magic variable...? for example : select *, from thistable where would be replaced by thistable. Rhys

Re: [GENERAL] in query variables....

2008-07-17 Thread Alvaro Herrera
Rhys A.D. Stewart escribió: Is there a way to get the name of the relation or relations in a query from within the query? Like some kind of magic variable...? for example : select *, some_magic_variable from thistable where some_magic_variable would be replaced by thistable.

[GENERAL] autovacuum logging 8.1

2008-07-17 Thread mikesdenning
Is there a way to disable some of the autovacuum logging? I don't want to see the below log over and over again in the logfile. postgres[85482]: [1-1] : LOG: autovacuum: processing database test_com Thanks, Mike -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make

Re: [GENERAL] query optimization

2008-07-17 Thread Klint Gore
Kevin Duffy wrote: So here are the questions for the PSQL gurus: Is getsectypekey(‘CFD’) executing for every join (or possible join) between positions_gsco and security? Causing a scan of security for every possible join. Does ‘ (select getsectypekey('CFD') ) ‘ cause the getsectype()

[GENERAL] Reducing memory usage of insert into select operations?

2008-07-17 Thread Francisco Reyes
Redhat 4 postgresql 8.3.3 Memory: 12GB While doing a couple of operations of the type insert into table select from some other table The OS triggered the out of memory killer (oom-killer). After some research and trial/error I found it was the inserts. I see one of the inserts is using up

Re: [GENERAL] TODO list and hyphen

2008-07-17 Thread Bruce Momjian
salman wrote: -Allow administrators to safely terminate individual sessions either via an SQL function or SIGTERM Can't you already do this with pg_cancel_backend() or kill child pid? Cancel backend only cancels the current query but later queries are still executed. Kill was never

Re: [GENERAL] TODO list and hyphen

2008-07-17 Thread Bruce Momjian
Scara Maccai wrote: Hi, I was looking at the TODO: http://www.postgresql.org/docs/faqs.TODO.html A hyphen, -, marks changes that will appear in the upcoming 8.4 release. Well, making a search for the - sign is complicated... it's obviously used for a lot of other things... could

Re: [GENERAL] Reducing memory usage of insert into select operations?

2008-07-17 Thread Douglas McNaught
On Thu, Jul 17, 2008 at 7:21 PM, Francisco Reyes [EMAIL PROTECTED] wrote: Redhat 4 postgresql 8.3.3 Memory: 12GB While doing a couple of operations of the type insert into table select from some other table The OS triggered the out of memory killer (oom-killer). Is this a 32-bit

Re: [GENERAL] Reducing memory usage of insert into select operations?

2008-07-17 Thread Douglas McNaught
On Thu, Jul 17, 2008 at 9:27 PM, Francisco Reyes [EMAIL PROTECTED] wrote: Douglas McNaught writes: Is this a 32-bit installation or 64-bit? 3GB of shared_buffers is way too big for a 32-bit setup. 64-bit. The machine has 12GB of RAM so shared-buffers is about 1/3. Dedicated DB server.

Re: [GENERAL] Reducing memory usage of insert into select operations?

2008-07-17 Thread Francisco Reyes
Douglas McNaught writes: It does seem that reducing work_mem might help you, but others on this I reduced it from 256MB to 64MB. It seems it is helping. At 256MB the usage per DB connection instance was upwards of 12GB. At 64MB so far is around 7GB. I just reduced it further to 32MB and see

Re: [GENERAL] Reducing memory usage of insert into select operations?

2008-07-17 Thread Francisco Reyes
Douglas McNaught writes: Is this a 32-bit installation or 64-bit? 3GB of shared_buffers is way too big for a 32-bit setup. 64-bit. The machine has 12GB of RAM so shared-buffers is about 1/3. Dedicated DB server. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make