[cvsnt-dev] Re: postgres doesn't do INSERT ... RETURNS

Tony Hoyle tony.hoyle at march-hare.com
Mon Jul 24 15:44:25 UTC 2006


Community technical support mailing list was retired 2010 and replaced with a professional technical support team. For assistance please contact: Pre-sales Technical support via email to sales@march-hare.com.


David Somers wrote:
> 
> Isn't the SessionId unique and only inserted once? So:
> 
> INSERT INTO SessionLog ( ... SessionId ...) Value ( ... 'XXX' ... )
> SELECT id FROM SessionLog WHERE SessionId='XXX'

That's too high level - it needs to be transparent to the calling application. 
so changing audit to do this is not an option.   It also won't work - if two 
threads are running simultaneously one of them will get the wrong ID.

All tables will have an Id field even when it's not normally used, so the 
driver can assume it's there... but running a select as above won't scale.

Tony


More information about the cvsnt-dev mailing list