Re: [SQL] undefine currval()

2003-09-09 Thread scott.marlowe
On Mon, 8 Sep 2003, Tom Lane wrote: > "scott.marlowe" <[EMAIL PROTECTED]> writes: > > On Mon, 8 Sep 2003, Bruce Momjian wrote: > >> I don't know how you could have an application that doesn't know if it > >> has issued a nextval() in the current connection. Unless you can explain > >> that, we hav

Re: [SQL] undefine currval()

2003-09-08 Thread Achilleus Mantzios
On Mon, 8 Sep 2003, Chris Gamache wrote: > I'm using sequences and currval() to retrieve the last inserted row in a table. > > > If currval() is undefined, as it is when a connection is made, then I know no > rows were inserted in that table and can take a different action. This is > problematic

Re: [SQL] undefine currval()

2003-09-08 Thread Tom Lane
"scott.marlowe" <[EMAIL PROTECTED]> writes: > On Mon, 8 Sep 2003, Bruce Momjian wrote: >> I don't know how you could have an application that doesn't know if it >> has issued a nextval() in the current connection. Unless you can explain >> that, we have no intention of playing tricks with currval()

Re: [SQL] undefine currval()

2003-09-08 Thread scott.marlowe
On Mon, 8 Sep 2003, Bruce Momjian wrote: > I don't know how you could have an application that doesn't know if it > has issued a nextval() in the current connection. Unless you can explain > that, we have no intention of playing tricks with currval() for > connection pooling. Actually, I would th

Re: [SQL] undefine currval()

2003-09-08 Thread Bruce Momjian
Chris Gamache wrote: > I'm using sequences and currval() to retrieve the last inserted row in a table. > > > If currval() is undefined, as it is when a connection is made, then I know no > rows were inserted in that table and can take a different action. This is > problematic when using a connect

Re: [SQL] undefine currval()

2003-09-08 Thread Tom Lane
Chris Gamache <[EMAIL PROTECTED]> writes: > One (theoretical) workaround would be to issue some sort of command to the > back-end database to wipe all values of currval() when a "new" connection is > made. I've done some digging in the system tables and source code, and can't > find an obvious solu

[SQL] undefine currval()

2003-09-08 Thread Chris Gamache
I'm using sequences and currval() to retrieve the last inserted row in a table. If currval() is undefined, as it is when a connection is made, then I know no rows were inserted in that table and can take a different action. This is problematic when using a connection pooling library, as the value