gnumed-devel
[Top][All Lists]
Advanced

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

Re: [Gnumed-devel] psql complains when trying to insert into ref.billabl


From: Karsten Hilbert
Subject: Re: [Gnumed-devel] psql complains when trying to insert into ref.billables
Date: Fri, 6 Jul 2012 17:40:18 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Fri, Jul 06, 2012 at 03:25:12PM +0000, Jim Busser wrote:

> Does a complaint such as
> 
>       ERROR:  record "new" has no field "row_version"
>       CONTEXT:  PL/pgSQL function "ft_ins_billable" line 2 at assignment
> 
> relate to the trigger given by
> 
>       \d+ ref.billable
> 
>       Triggers:
>       zt_ins_billable BEFORE INSERT ON ref.billable FOR EACH ROW EXECUTE 
> PROCEDURE audit.ft_ins_billable()

Yes.

> which, looking up in
> 
>       
> http://publicdb.gnumed.de/~ncq/gnumed/schema/gnumed_v17/gnumed-schema.html#ref.schema
> 
> gives
> 
> BEGIN
>       NEW.row_version := 0;
>       NEW.modified_when := CURRENT_TIMESTAMP;
>       NEW.modified_by := SESSION_USER;
>       return NEW;
> END;
> 
> which puzzlement on my part -- as to what this does --
> desires better understanding. Is this somehow meaning that
> the insertion of records into the reference table is
> intended to invoke some kind of auditing?

Yes. I cannot tell *why* I once considered ref.billable to
benefit from auditing - perhaps so that old bills can be
verified even after related billables have been deleted.

The more interesting thing is why the corresponding audit
table does not exist (IOW hasn't been created during
upgrading). I'll check that tonight.

Karsten
-- 
GPG key ID E4071346 @ gpg-keyserver.de
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346



reply via email to

[Prev in Thread] Current Thread [Next in Thread]