[cvsnt] Re: Audit DB: commitlog.sessionid is always 0

Tony Hoyle tony.hoyle at march-hare.com
Thu Jan 5 13:50:49 GMT 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.


Olaf Groeger wrote:
> Tony,
> I installed the Audit DB on Linux with a postgresql db and it happens that
> the sessionid column in commitlog and historylog (and maybe taglog) is 0
> for all rows.
> I used the cvs server rpm download cvsnt-2.5.03.2151-rh9-rpm.tar.gz and the
> plugin from cvsnt-database-odbc-2.5.03.2151-1.i386.rpm. There was not
> postgresql counterpart, as i expected, so i setup the database type in
> PServer to ODBC. For creating the tables i used the
> script /triggers/sql/create_tables_pgsql.sql from the Sources.
> 
> The plugin inserts in commitlog, sessionlog and historylog, but the
> sessionid in commitlog and historylog is 0 for all rows and don't contain
> the correspondant sessionlog.id. Obviously, this breaks the connection
> between the sessionlog table and the other tables.

I expect the ODBC plugin for postgresql doesn't properly support 
@@identity.  Without that none of the relationships will work.  The 
postgres native driver has some support for this.

Note that postgres is virtually untested due to the Win32 install 
stomping all over system32 (so it's not safe to install on a dev 
machine).  Last I heard there were plans to address this so I'm waiting 
for an updated installer to get some serious development in.

> Anyway, i propose to make commitlog.sessionid and historylog.sessionid a
> foreign key to sessionlog.id to ensure the referential integrity.

Many databases don't support referential integrity so it can't be part 
of the standard schema, but there's no particular reason not to add it 
for a particular installation if it's available.

Tony



More information about the cvsnt mailing list
Download the latest CVSNT, TortosieCVS, WinCVS etc. for Windows 8 etc.
@CVSNT on Twitter   CVSNT on Facebook