Re: [SQL] Retrieving the new nextval...

2002-09-02 Thread GB Clark
On Wed, 28 Aug 2002 18:32:45 +0200 (CEST) friedrich nietzsche <[EMAIL PROTECTED]> wrote: > Hi all, > I'm in trouble with the same problem, but in PHP.. > With your solution, I cannot be totally sure that last > inserted raw was mine... > Because I'm on a web page, it could be that, as soon > as I

Re: [SQL] Retrieving the new "nextval" for primary keys....

2002-09-02 Thread GB Clark
On Wed, 28 Aug 2002 18:36:10 +0200 (CEST) friedrich nietzsche <[EMAIL PROTECTED]> wrote: > One solution seems to locking table(s), > but I prefer to leave it as last chance... > using table locks, and the trick of writing and > suddenly reading back from DB it probably works, > but it doesn't se

Re: [SQL] Retrieving the new nextval...

2002-08-28 Thread Jeff Eckermann
--- friedrich nietzsche <[EMAIL PROTECTED]> wrote: > Hi all, > I'm in trouble with the same problem, but in PHP.. > With your solution, I cannot be totally sure that > last > inserted raw was mine... > Because I'm on a web page, it could be that, as soon > as I've inserted my record, another one

Re: [SQL] Retrieving the new "nextval" for primary keys....

2002-08-28 Thread friedrich nietzsche
One solution seems to locking table(s), but I prefer to leave it as last chance... using table locks, and the trick of writing and suddenly reading back from DB it probably works, but it doesn't seems so sexy... :) ciao danilo

Re: [SQL] Retrieving the new nextval...

2002-08-28 Thread friedrich nietzsche
Hi all, I'm in trouble with the same problem, but in PHP.. With your solution, I cannot be totally sure that last inserted raw was mine... Because I'm on a web page, it could be that, as soon as I've inserted my record, another one do an insertion, so I would get the wrong ID... does transactions

Re: [SQL] Retrieving the new "nextval" for primary keys....

2002-08-28 Thread Kevin Brannen
Greg Patnude wrote: > I am using postgreSQL with Perl::CGI and Perl::DBI::Pg... I would like to be > able to insert a row from my Perl script [$SQL->exec();] and have postgreSQL > return the id of the newly inserted record (new.id) directly to the Perl > script for further processing... Anyone wit

[SQL] Retrieving the new "nextval" for primary keys....

2002-08-28 Thread Greg Patnude
I am using postgreSQL with Perl::CGI and Perl::DBI::Pg... I would like to be able to insert a row from my Perl script [$SQL->exec();] and have postgreSQL return the id of the newly inserted record (new.id) directly to the Perl script for further processing... Anyone with a solution / idea ??? Nea