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

David Somers dsomers at omz13.com
Mon Jul 24 14:38:07 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.


Tony,

cvsapi/db/postgres/PostgresConnection is broken.
::ExecuteAndReturnIdentity makes use of "RETURNING" which is an ORACLE (and
SQLITE?)-specific option.

BTW, I just committed a change to PostgresRecordset.cpp so the result set
will correctly parse ints... so now it DOES pick up the correct version
from schemaversion... unfortunately, with the aforementioned RETURNING the
subsequent INSERT into SessionLog will fail.

16:02:34: S -> PG EXEC 'Select Version From caslon.SchemaVersion'
16:02:34: S -> PG numParams=0
16:02:34: S -> PG rslt=135720168 OK
16:02:34: S -> PG_rs: m_num_fields=1; m_num_rows=1
16:02:34: S -> PG_rs op int: pStmt=; row=0; field=0; r=2
16:02:34: S -> PG EXEC 'Insert Into caslon.SessionLog (Command, StartTime,
Hostname, Username, SessionId, VirtRepos, PhysRepos, Client) Values
('version','2006-07-24
14:02:34','garamond.omz13.local','dsomers','320644c4d2fa5aff','/omz13','/var/lib/cvsnt/omz13','CVSNT
2.5.04 (Zen) Build 2400') returning Id'
16:02:34: S -> PG numParams=0
16:02:34: S -> PG rslt=135685704 FAIL ERROR:  syntax error at or
near "returning" at character 270

audit_trigger error (session): ERROR:  syntax error at or near "returning"
at character 270

Cheers,

David.


More information about the cvsnt-dev mailing list