On Wed, May 22, 2019 at 3:21 PM PegoraroF10 <mar...@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.