From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Jules Alberts" <jules(dot)alberts(at)arbodienst-limburg(dot)nl> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: parameter in trigger function |
Date: | 2003-08-15 15:40:28 |
Message-ID: | 18605.1060962028@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
"Jules Alberts" <jules(dot)alberts(at)arbodienst-limburg(dot)nl> writes:
> Code like this
> NEW.$1 := lower(NEW.$1)
> won't work, all I get is error messages :-(
Can't do that in plpgsql; it does not like run-time specification of
table or field names. You could try using EXECUTE but I doubt that
will work either for an assignment to NEW.
I'd suggest using pltcl, which is more amenable to run-time
determination of field names.
> mostly says the opposite. Is this possible at all? How do I read the
> TriggerData structure from whithin a pl/pgsql function?
You are looking for TG_ARGV[], though this is not your biggest
problem...
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Teodor Sigaev | 2003-08-15 15:46:39 | Re: tsearch2 in 7.4beta1 compile problem |
Previous Message | Jan Wieck | 2003-08-15 15:39:38 | Re: parameter in trigger function |