Re: Verify a record has a column in a plpgsql trigger

From: Merlin Moncure <mmoncure(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Verify a record has a column in a plpgsql trigger
Date: 2010-02-05 15:08:11
Message-ID: b42b73151002050708q4b524118q65b5ca9ff0b6ea79@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Feb 4, 2010 at 7:36 PM, Tim Landscheidt <tim(at)tim-landscheidt(dot)de> wrote:
>> Any insight on a way I can grab NEW.(colRow.attname) without EXECUTE USING?
>
> Wouldn't it be *much* easier to just have /two/ trigger
> functions? Your "editor" columns probably don't pop up and
> disappear randomly.

or, you could pass an argument to the trigger function from 'create
trigger'...you have to have one for each table anyways, and you could
wrap the trigger creation with some dyna-sql that looks up the editor
field and sets the argument appropriately,

merlin

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Moe 2010-02-05 15:48:09 Searching a DB index.. possible?
Previous Message Albe Laurenz 2010-02-05 14:59:06 Re: Query to find list of dates between two dates