Help needed

From: NosyMan <nosyman(at)gmail(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Help needed
Date: 2005-11-30 09:18:28
Message-ID: 200511301118.28795.nosyman@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hi everyone,

I have some kind of strange problem. I want to build general parametrized
trigger for my database. The parameter sent to the trigger contains a column
name that trigger should be check.

CREATE OR REPLACE FUNCTION F_T_IU__check() RETURNS trigger AS $$
DECLARE
vt VARCHAR;
BEGIN
...........................................................
vt:='constant_value_id';
RAISE EXCEPTION 'aaa=%', NEW.vt;
.............................................................

The 'vt' variable contains the column name. In the above statement I want that
NEW.vt to be interpreted as NEW.constant_value_id. It is possible to do this?

Thanks,
Nosy

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Richard Huxton 2005-11-30 10:35:55 Re: Help needed
Previous Message Jan Wieck 2005-11-29 23:25:02 Re: Triggers