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

From: Mike Ginsburg <mginsburg(at)collaborativefusion(dot)com>
To: Merlin Moncure <mmoncure(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Verify a record has a column in a plpgsql trigger
Date: 2010-02-05 18:08:51
Message-ID: 4B6C5EB3.3000205@collaborativefusion.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Merlin Moncure wrote:
> 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
>
>
Thanks again for all the help. I started playing around with custom
session vars and it seems to be working well.

Mike Ginsburg
mginsburg(at)collaborativefusion(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message David Kerr 2010-02-05 19:53:32 PostgreSQL + Hibernate, Apache Mod Security, SQL Injection and you (a love story)
Previous Message Farrer, Rhys 2010-02-05 17:06:33 a quick question