Re: Trigger bug ? - Mailing list pgsql-general

From David G. Johnston
Subject Re: Trigger bug ?
Date
Msg-id CAKFQuwbsvAjGvXkGMUCQLaecLJnFuDyTSu=8tNbdyuBtfpj=HQ@mail.gmail.com
Whole thread Raw
In response to Re: Trigger bug ?  (PegoraroF10 <marcos@f10.com.br>)
Responses Re: Trigger bug ?
List pgsql-general
On Wed, May 22, 2019 at 3:21 PM PegoraroF10 <marcos@f10.com.br> wrote:
Try to create exactly what I sent you and you´ll see null values on that pk. 

You should probably submit self-contained examples if you need the user to do this.
 
And that occurs just because that trigger was created without EACH
ROW/STATEMENT.
 
So, my question is, PG should return an error and not create that trigger
because ROW/STATEMENT was not specified, correct ?

PostgreSQL doesn't inspect the called function to see if it is written correctly for a given invocation of CREATE TRIGGER.  So, no, given that your command was syntactically valid PostgreSQL doesn't have any reason to return an error.

David J.

pgsql-general by date:

Previous
From: PegoraroF10
Date:
Subject: Re: Trigger bug ?
Next
From: PegoraroF10
Date:
Subject: Re: Trigger bug ?