Re: [GENERAL] problem with pg_standby

2010-08-04 Thread Gerd Koenig
thanks Greg, yes, we want SELinux in enforcing mode. Thereby (and to ensure persistence) just chcon is the wrong way and * semanage fcontext -a -t postgresql_t 'dir' * restorecon -vvFR dir is much better ;-) regards--GERD-- On Wednesday, August 04, 2010 07:56:56 am Greg Smith wrote: Gerd Koenig

Re: [GENERAL] PG 8.4 won't start on Windows Server 2008 64-bit

2010-08-04 Thread David R Robison
To confirm, I'm not getting the This application has requested the Runtime to terminate it in an unusual way error even when I run postgres manually (not as a service). We are running as a VMWare VM with Server 2008 Enterprise Edition. I am going to try a fresh VM with 2008 Standard version.

[GENERAL] Postgresql database procedures?

2010-08-04 Thread Machiel Richards
Good day all I am looking for some info / resources where I can learn how to write database procedures, functions,etc? I am a total newbie to this and will need to learn from scratch Would appreciate the help a lot Machiel

Re: [GENERAL] Postgresql database procedures?

2010-08-04 Thread zhong ming wu
On Wed, Aug 4, 2010 at 7:32 AM, Machiel Richards machi...@rdc.co.za wrote: Good day all   I am looking for some info / resources where I can learn how to write database procedures, functions,etc?    I am a total newbie to this and will need to learn from scratch     Would

Re: [GENERAL] Postgresql database procedures?

2010-08-04 Thread Raymond O'Donnell
On 04/08/2010 12:32, Machiel Richards wrote: Good day all I am looking for some info / resources where I can learn how to write database procedures, functions,etc? I am a total newbie to this and will need to learn from scratch Would appreciate the help a lot Hi there, The manual

Re: [GENERAL] Postgresql database procedures?

2010-08-04 Thread Raymond O'Donnell
On 04/08/2010 12:55, Raymond O'Donnell wrote: On 04/08/2010 12:32, Machiel Richards wrote: Good day all I am looking for some info / resources where I can learn how to write database procedures, functions,etc? I am a total newbie to this and will need to learn from scratch Would

Re: [GENERAL] libpq logging redirection

2010-08-04 Thread devman
It works fine. Thank you very much! -- GMX DSL: Internet-, Telefon- und Handy-Flat ab 19,99 EUR/mtl. Bis zu 150 EUR Startguthaben inklusive! http://portal.gmx.net/de/go/dsl -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription:

[GENERAL] hashtable issue - HASH_FIND??

2010-08-04 Thread Jay Flattery
Hi there, I'm looking to use the PostgreSQL Hash Table for some custom functions. However, the example, as per http://wiki.postgresql.org/wiki/HashTable crashes postmaster (or segfaults from the cmd line) when trying to retrieve an element from the hash. Specifically this line fails: elem =

Re: [GENERAL] Postgresql database procedures?

2010-08-04 Thread David Fetter
On Wed, Aug 04, 2010 at 07:38:15AM -0400, zhong ming wu wrote: On Wed, Aug 4, 2010 at 7:32 AM, Machiel Richards machi...@rdc.co.za wrote: Good day all I am looking for some info / resources where I can learn how to write database procedures, functions,etc? Do you have any particular

[GENERAL] killing idle attaches without killing others

2010-08-04 Thread Gauthier, Dave
Hi: 8.3.4 on Linux How can one kill just the IDLE processes I see attached to a DB (from pg_stat_activity) without disturbing the others? If I need to kill the idle pids one ata time, which signal_name should I use for that? Thanks !

Re: [GENERAL] killing idle attaches without killing others

2010-08-04 Thread Vick Khera
On Wed, Aug 4, 2010 at 10:03 AM, Gauthier, Dave dave.gauth...@intel.comwrote: How can one kill just the IDLE processes I see attached to a DB (from pg_stat_activity) without disturbing the others? If I need to kill the idle pids one ata time, which signal_name should I use for that?

Re: [GENERAL] killing idle attaches without killing others

2010-08-04 Thread Dean Rasheed
On 4 August 2010 15:18, Vick Khera vi...@khera.org wrote: On Wed, Aug 4, 2010 at 10:03 AM, Gauthier, Dave dave.gauth...@intel.com wrote: How can one kill just the IDLE processes I see attached to a DB (from pg_stat_activity) without disturbing the others?  If I need to kill the idle pids one

Re: [GENERAL] killing idle attaches without killing others

2010-08-04 Thread Guillaume Lelarge
Le 04/08/2010 16:18, Vick Khera a écrit : On Wed, Aug 4, 2010 at 10:03 AM, Gauthier, Dave dave.gauth...@intel.comwrote: How can one kill just the IDLE processes I see attached to a DB (from pg_stat_activity) without disturbing the others? If I need to kill the idle pids one ata time,

Re: [GENERAL] killing idle attaches without killing others

2010-08-04 Thread John R Pierce
On 08/04/10 7:03 AM, Gauthier, Dave wrote: Hi: 8.3.4 on Linux How can one kill just the IDLE processes I see attached to a DB (from pg_stat_activity) without disturbing the others? If I need to kill the idle pids one ata time, which signal_name should I use for that? kill the

Re: [GENERAL] hashtable issue - HASH_FIND??

2010-08-04 Thread Tom Lane
Jay Flattery jayc...@rocketmail.com writes: I'm looking to use the PostgreSQL Hash Table for some custom functions. However, the example, as per http://wiki.postgresql.org/wiki/HashTable crashes postmaster (or segfaults from the cmd line) when trying to retrieve an element from the hash.

Re: [GENERAL] killing idle attaches without killing others

2010-08-04 Thread Gauthier, Dave
How does PG determine if a process is IDLE ? It there some sort of timeout? I want to be able to distinguish between somene who's interrupted on the phone for a couple minutes vs the guy who left the program running over the weekend. -Original Message- From:

[GENERAL] Embedded text column versus referenced text

2010-08-04 Thread Rikard Bosnjakovic
I am in the design phase of a new db so I cannot test queries using explain/analyze yet, but regarding performance, is there any difference in doing this: CREATE TABLE something (name text, age smallint, ...other columns..., comment text); compared to this: CREATE TABLE comments (id serial

Re: [GENERAL] Danger of idiomatic plpgsql loop for merging data

2010-08-04 Thread Merlin Moncure
On Tue, Aug 3, 2010 at 11:32 PM, J. Greg Davidson j...@well.com wrote: Hi fellow PostgreSQL hackers, First, a thank you to Merlin for commenting on my earlier post! I've run into another dangerous problem since the earlier post. I began converting from the plpgsql loop idiom for merging data

[GENERAL] tgname munged

2010-08-04 Thread gnuoytr
Can anyone explain why the following query (used by AQT to display its tree): SELECT trig.tgname, tab.relname, case trig.tgenabled when '1' then 'yes' else 'no' end, trig.oid FROM pg_catalog.pg_trigger trig, pg_catalog.pg_class tab, pg_catalog.pg_namespace nam WHERE trig.tgrelid=tab.oid AND

Re: [GENERAL] hashtable issue - HASH_FIND??

2010-08-04 Thread Jay Flattery
Thanks for your reply. Actually I had already changed the sizeof()s.. Not sure of the actual error, postmaster just dies: NOTICE: Didn't find 9 -- good NOTICE: about to extract object at key 0 (extra notice added by me) LOG: server process (PID 55483) was terminated by signal 11: Segmentation

Re: [GENERAL] hashtable issue - HASH_FIND??

2010-08-04 Thread Tom Lane
Jay Flattery jayc...@rocketmail.com writes: I'm looking to use the PostgreSQL Hash Table for some custom functions. However, the example, as per http://wiki.postgresql.org/wiki/HashTable crashes postmaster (or segfaults from the cmd line) when trying to retrieve an element from the hash.

Re: [GENERAL] hashtable issue - HASH_FIND??

2010-08-04 Thread Tom Lane
Jay Flattery jayc...@rocketmail.com writes: Actually I had already changed the sizeof()s.. Not sure of the actual error, postmaster just dies: NOTICE: Didn't find 9 -- good NOTICE: about to extract object at key 0 (extra notice added by me) LOG: server process (PID 55483) was terminated

Re: [GENERAL] tgname munged

2010-08-04 Thread Stéphane A. Schildknecht
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Le 04/08/2010 17:30, gnuo...@rcn.com a écrit : Can anyone explain why the following query (used by AQT to display its tree): SELECT trig.tgname, tab.relname, case trig.tgenabled when '1' then 'yes' else 'no' end, trig.oid FROM

Re: [GENERAL] tgname munged

2010-08-04 Thread gnuoytr
(RCN is messing up my e-mail, so this is all copied!) Hi, Which version of PostgreSQL is it ? I can't see any difference with PG 8.4.4. Regards, - -- Stéphane Schildknecht D'oh, 8.4.4 running on Ubuntu 10.04. I originally saw it running AQT in wine, but it also happens running RazorSQL in

Re: [GENERAL] killing idle attaches without killing others

2010-08-04 Thread Vick Khera
On Wed, Aug 4, 2010 at 10:50 AM, Gauthier, Dave dave.gauth...@intel.com wrote: How does PG determine if a process is IDLE ?  It there some sort of timeout?  I want to be able to distinguish between somene who's interrupted on the phone for a couple minutes vs the guy who left the program

Re: [GENERAL] killing idle attaches without killing others

2010-08-04 Thread Joshua D. Drake
On Wed, 2010-08-04 at 14:40 -0400, Vick Khera wrote: On Wed, Aug 4, 2010 at 10:50 AM, Gauthier, Dave dave.gauth...@intel.com wrote: How does PG determine if a process is IDLE ? It there some sort of timeout? I want to be able to distinguish between somene who's interrupted on the

Re: [GENERAL] Embedded text column versus referenced text

2010-08-04 Thread Vick Khera
On Wed, Aug 4, 2010 at 11:05 AM, Rikard Bosnjakovic rikard.bosnjako...@gmail.com wrote: The comments field will be used here and there but I expect it will most often be NULL. If it is most often NULL it won't really take up much space in the table. However, if when it does have content the

Re: [GENERAL] hashtable issue - HASH_FIND??

2010-08-04 Thread Tom Lane
Jay Flattery jayc...@rocketmail.com writes: Actually, if I just dump the example into a file, compile and install it as a function, it works. Only fails when I add the code (without changing anything!) to existing source where I'd like to use it. Hmph, are you trying to incorporate this

Re: [GENERAL] hashtable issue - HASH_FIND??

2010-08-04 Thread Jay Flattery
Actually, if I just dump the example into a file, compile and install it as a function, it works. Only fails when I add the code (without changing anything!) to existing source where I'd like to use it. (gdb) next Single stepping until exit from function _sigtramp, which has no line number

Re: [GENERAL] Danger of idiomatic plpgsql loop for merging data

2010-08-04 Thread J. Greg Davidson
On Wed, 2010-08-04 at 11:12 -0400, Merlin Moncure wrote: The infinite loop check is good but you missed the most important part: you need to be checking sqlerrm to see where the unique violation is coming from. Your original issue was that some dependent trigger was causing the error which

Re: [GENERAL] package org.postgresql.util does not exist compilation problem

2010-08-04 Thread Santiago Álvarez Martínez
Hi, Craig: Thanks for your reply. I've just discovered where the error was (and, as I supposed, it was my fault). Before adding the PostgreSQL dependency, I had this one, some lines before: dependency groupId${jdbcDriver.groupId}/groupId

[GENERAL]

2010-08-04 Thread andi astowo
At this oppurtinity we ask for your support to give us informations regarding the bellow questionaires. First, how can we have our data of the Postgre 7 under Red Hat Linux 7.2 to be used by the Postgre 8 under RHEL 5?. Secondly, if above condition need additional software or driver or

Re: [GENERAL]

2010-08-04 Thread Phillip Smith
On 5 August 2010 11:54, andi astowo andi.ast...@ymail.com wrote: At this oppurtinity we ask for your support to give us informations regarding the bellow questionaires. First, how can we have our data of the Postgre 7 under Red Hat Linux 7.2 to be used by the Postgre 8 under RHEL 5?.

Re: [GENERAL] Embedded text column versus referenced text

2010-08-04 Thread Craig Ringer
On 04/08/10 23:05, Rikard Bosnjakovic wrote: I am in the design phase of a new db so I cannot test queries using explain/analyze yet, but regarding performance, is there any difference in doing this: CREATE TABLE something (name text, age smallint, ...other columns..., comment text);

Re: [GENERAL] On insert duplicate row, return existing key

2010-08-04 Thread Nick
Anyone? Please On Jul 31, 12:36 pm, Nick nboutel...@gmail.com wrote: If I insert a duplicate row into a table, id like to return the existing key. I tried creating a rule for this... CREATE RULE no_duplicates AS ON INSERT TO names WHERE EXISTS (SELECT 1 FROM names WHERE new.name = name) DO

Re: [GENERAL]

2010-08-04 Thread Scott Marlowe
On Wed, Aug 4, 2010 at 7:54 PM, andi astowo andi.ast...@ymail.com wrote: At this oppurtinity we ask for your support to give us informations regarding the bellow questionaires. First, how can we have our data of the Postgre 7 under Red Hat Linux 7.2 to be used by the Postgre 8 under RHEL 5?.