Re: trigger functions broken?

From: "Jaime Casanova" <jcasanov(at)systemguards(dot)com(dot)ec>
To: "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: trigger functions broken?
Date: 2008-10-08 19:30:48
Message-ID: 3073cc9b0810081230k36b58300scfbfe7aa64c43@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Oct 8, 2008 at 3:56 PM, A. Kretschmer
<andreas(dot)kretschmer(at)schollglas(dot)com> wrote:
> am Wed, dem 08.10.2008, um 14:29:23 -0400 mailte Alvaro Herrera folgendes:
>> Hi,
>>
>> Trigger functions are supposed to be able to be called only as triggers,
>> but apparently the check is not working in CVS HEAD:
>>
>> alvherre=# create or replace function foo () returns trigger as $$ begin perform 1; return new; end; $$ language plpgsql;
>> CREATE FUNCTION
>> alvherre=# select foo();
>> foo
>> -----
>>
>> (1 fila)
>
>
> And?
>
> The function returns a TRIGGER, not a value.
>

actually, that means that you can return undefined values for NEW and
OLD...and worse you can update other tables based on undefined NEW/OLD
values?

--
Atentamente,
Jaime Casanova
Soporte y capacitación de PostgreSQL
Asesoría y desarrollo de sistemas
Guayaquil - Ecuador
Cel. +59387171157

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2008-10-08 19:51:48 Re: trigger functions broken?
Previous Message Hannu Krosing 2008-10-08 19:06:28 Re: trigger functions broken?