Re: A trigger in an extension - Mailing list pgsql-admin

From Tom Lane
Subject Re: A trigger in an extension
Date
Msg-id 2790099.1740079810@sss.pgh.pa.us
Whole thread Raw
In response to A trigger in an extension  (Olleg Samoylov <splarv@ya.ru>)
Responses Re: A trigger in an extension
List pgsql-admin
Olleg Samoylov <splarv@ya.ru> writes:
> I have the extension pgpro_scheduler. In the exception there are two 
> tables and the trigger on one of them that write to the other. I was 
> surprised but when I load dump created by pg_dump this trigger is 
> created in the pre-data stage (automatically by create extension) early 
> and thus has wrong behavior when uploaded data in the data stage (lead 
> to duplication of primary key).

pg_dump does not like to editorialize on the contents of extensions.
It just does CREATE EXTENSION and doesn't inquire into what's in
them.  I'd argue that if you need triggers like this, maybe you
should rethink your data model.

            regards, tom lane



pgsql-admin by date:

Previous
From: Olleg Samoylov
Date:
Subject: A trigger in an extension
Next
From: Bruce Momjian
Date:
Subject: Re: Create a Database or a Schema -- when to do what?