Search Postgresql Archives

unable to assign value to composite column in trigger

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

 



The following is a snippet from a trigger i am using:

_mycompositeType.user_id = (OLD).mycompositeType.user_id;
...do some stuff... --notice that assigning from the trigger record works

but later on...

(new).mycompositeType.transaction_id := _transaction_id;

Fails with syntax error at or near "("

I have tried removing the () and it fails with "syntax error at or near "new""

non composite column can be assigned to in the trigger just fine:

new.other_columm := 5;  --gives no issues

How can a composite column be assigned to inside a trigger?

Thanks

Ketema J. Harris
www.ketema.net
ketema@xxxxxxxxxx
ketemaj on iChat



--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[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