unable to assign value to composite column in trigger

From: Ketema Harris <ketema(at)ketema(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: unable to assign value to composite column in trigger
Date: 2008-12-18 21:19:56
Message-ID: A705429E-D691-4C2E-8197-D55D4A9AF49F@ketema.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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(at)ketema(dot)net
ketemaj on iChat

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ketema Harris 2008-12-18 21:26:32 Re: unable to assign value to composite column in trigger
Previous Message Scott Marlowe 2008-12-18 20:27:57 Re: Mirroring existing mysql setup