[GENERAL] postgres and PERL

1999-03-14 Thread James Puckett
I have written a program which queries a fairly large table with "GROUP BY" & "ORDER BY". The queries are taking a while to complete. It seems like the connection to the database is timing out before the results are returned. Any suggestions? -James

[GENERAL] The value returned by autoinc ?

1999-03-14 Thread Silvio Emanuel Barbosa de Macedo
Hi! When I insert data into a table with a sequence associated to a column (and the required trigger), how can I know the value the sequence has just generated ? (think in parallel accesses) Would this approach be the answer ? begin work insert... select max... commit ,,,

Re: [GENERAL] Foreign Keys: check_primary_function

1999-03-14 Thread Bruce Momjian
Applied. > Hi All, > I've changed the check_primary_key() function code to allow for either > the "automatic insert key rule" or "dependent insert key rule". > Previously it restricted the addtion of a child entry if the > corresponding parent entry was not there. Now if the option is > "automat

Re: [GENERAL] daily check for expired data ?

1999-03-14 Thread Herouth Maoz
At 22:48 +0200 on 11/3/99, Ralf Weidemann wrote: > > how could I do an automatic daily check > to delete some expired data ? I mean > can I have a cron functionality in post- > gresql ? You don't need to have cron functionality in postgresql when you have cron functionality in cron. :) What yo

[GENERAL] Error building pg 6.4 on RH Linux

1999-03-14 Thread Henk Jan Barendregt
LS, When I try to build PG 6.4 on Red Hat Linux 5.2 gmake cant't find the file y.tab.h in the backand/bootstrap directory. I seems that this file should be created during the build process. What can i do to get this file. Henk Jan

Re: [GENERAL] Negating the list of selected rows of a join

1999-03-14 Thread Ulf Mehlig
Clark Evans <[EMAIL PROTECTED]>/Ulf Mehlig <[EMAIL PROTECTED]> wrote: > > > Hope this will do the trick. > > > > Maybe not -- doesn't that mean, that the query won't return a > > single row in case there is *any* pair of equal names in both > > tables?! > > No. It's a correlated sub-que

Re: [GENERAL] Negating the list of selected rows of a join

1999-03-14 Thread Clark Evans
Manuel Lemos wrote: > > I want to list the rows of a table with a text field whose values do not > exist in a similar field of another table. Basically what I want to get > is negated results of a join. Ulf Mehlig wrote: >SELECT name FROM table_a >WHERE name NOT IN (SELECT name FROM ta

Re: [GENERAL] Negating the list of selected rows of a join

1999-03-14 Thread Ulf Mehlig
Clark Evans <[EMAIL PROTECTED]>: > Manuel Lemos wrote: > > How can I make a query that works the way I want all the time, even for the > > case when table_b is empty? > > SELECT table_a.name, table_a.age > FROM table_a > WHERE NOT EXISTS ( > SELECT 'x' > FROM

Re: [GENERAL] Negating the list of selected rows of a join

1999-03-14 Thread Ulf Mehlig
Manuel Lemos <[EMAIL PROTECTED]> wrote: > I want to list the rows of a table with a text field whose values do not > exist in a similar field of another table. Basically what I want to get > is negated results of a join. [...] > It worked except for the case when table_b is empty. In this c

Re: [GENERAL] PostgreSQL EndTransactionBlock and not inprogress/abort state

1999-03-14 Thread Clark Evans
Clark Evans wrote: > > Manuel Lemos wrote: > > > > Hello, > > > > I am trying to use transactions with PostgreSQL with the normal sequence > > > > BEGIN > > one or more SELECT/INSERT/UPDATE/DELETE queries > > COMMIT > > END > > > > But I am getting the following message just like if I haven't sta

Re: [GENERAL] PostgreSQL EndTransactionBlock and not inprogress/abort state

1999-03-14 Thread Clark Evans
Manuel Lemos wrote: > > Hello, > > I am trying to use transactions with PostgreSQL with the normal sequence > > BEGIN > one or more SELECT/INSERT/UPDATE/DELETE queries > COMMIT > END > > But I am getting the following message just like if I haven't started a > transaction when I commit. > > E

Re: [GENERAL] Negating the list of selected rows of a join

1999-03-14 Thread Clark Evans
Manuel Lemos wrote: > How can I make a query that works the way I want all the time, even for the > case when table_b is empty? SELECT table_a.name, table_a.age FROM table_a WHERE NOT EXISTS ( SELECT 'x' FROM table_b WHERE table_b.name = table_a.name

[GENERAL] PostgreSQL EndTransactionBlock and not inprogress/abort state

1999-03-14 Thread Manuel Lemos
Hello, I am trying to use transactions with PostgreSQL with the normal sequence BEGIN one or more SELECT/INSERT/UPDATE/DELETE queries COMMIT END But I am getting the following message just like if I haven't started a transaction when I commit. EndTransactionBlock and not inprogress/abort state

[GENERAL] Negating the list of selected rows of a join

1999-03-14 Thread Manuel Lemos
Hello, I want to list the rows of a table with a text field whose values do not exist in a similar field of another table. Basically what I want to get is negated results of a join. Lets say the tables table_a and table_b have the field name. table_a table_b name age name - ---