Search Postgresql Archives

Re: Getting Primary Key Value After Insert

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Richard Broersma Jr <rabroersma@xxxxxxxxx> writes:

> > 3.  If you call currval() will it return 20?  I would think it does.

Yes it does.

> My understanding is that it will provided your are within a transaction. 

As long as you're in the same session you're fine. You would have to go out of
your way to break it but if you're using some sort of connection pooling you
wouldn't want to pull a fresh connection from the pool, for example.

-- 
greg



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux