Re: [GENERAL]

2010-08-04 Thread Scott Marlowe
On Wed, Aug 4, 2010 at 7:54 PM, andi astowo 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?. > Secondly, if above

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

2010-08-04 Thread Nick
Anyone? Please On Jul 31, 12:36 pm, Nick 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 INSTEAD SELEC

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]

2010-08-04 Thread Phillip Smith
On 5 August 2010 11:54, andi astowo 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?. Secondly, > if above con

[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 con

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: ${jdbcDriver.groupId} ${jdbcDriver.artifactId} ${jdbcDrive

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 whic

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 inf

Re: [GENERAL] hashtable issue - HASH_FIND??

2010-08-04 Thread Tom Lane
Jay Flattery 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 code into the core

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 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 contents are large, and are n

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 > wrote: > > > > How does PG determine if a process is ? It there some sort of > > timeout? I want to be able to distinguish between somene who's interrupted > > on the phone for a couple m

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 wrote: > > How does PG determine if a process is ?  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

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] 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 pg_c

Re: [GENERAL] hashtable issue - HASH_FIND??

2010-08-04 Thread Tom Lane
Jay Flattery 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 by signal 11: Segme

Re: [GENERAL] hashtable issue - HASH_FIND??

2010-08-04 Thread Tom Lane
Jay Flattery 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. BTW, I tested t

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

[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 tab.re

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 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 > into

[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 prima

Re: [GENERAL] killing idle attaches without killing others

2010-08-04 Thread Gauthier, Dave
How does PG determine if a process is ? 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: pgsql-general-ow...@postgresq

Re: [GENERAL] hashtable issue - HASH_FIND??

2010-08-04 Thread Tom Lane
Jay Flattery 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. I think the "pa

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 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 programs tha

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 > wrote: > >> How can one kill just the 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 shoul

Re: [GENERAL] killing idle attaches without killing others

2010-08-04 Thread Dean Rasheed
On 4 August 2010 15:18, Vick Khera wrote: > On Wed, Aug 4, 2010 at 10:03 AM, Gauthier, Dave > wrote: >> >> How can one kill just the 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 shou

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 wrote: > How can one kill just the 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? > > > > Connected to psql as a sup

[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 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] 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 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 tasks in mind?

[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 = ha

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: http://www.po

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 appreciat

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 i

Re: [GENERAL] Postgresql database procedures?

2010-08-04 Thread zhong ming wu
On Wed, Aug 4, 2010 at 7:32 AM, 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

[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] 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