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 seems so sexy... :)
> ciao
> danilo 
> 

Why would you have to lock the table?  currval() is connection safe.

I would either do the insert and then do a currval() OR do a nextval()
and do the insert.  Either one would work. I always just do the insert
and then call currval() to get the current serial number for the connection.

GB

-- 
GB Clark II             | Roaming FreeBSD Admin
[EMAIL PROTECTED] | General Geek 
           CTHULU for President - Why choose the lesser of two evils?

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly

Reply via email to