Olleg Samoylov <splarv@xxxxx> 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 saw this.
I'd argue that if you need triggers like this, maybe you should rethink your data model.
regards, tom lane
This is not my extension. This is foreign extension that emulate sheduler or cron behaviour similar to oracle. Two tables: the second is history table where logged changes of the first cron table.
The question is: is this somehow violate documented rules for extensions, so I can point the extension developers to the documentation? May be triggers is explicitly forbidden for extensions? Or may be need to document this?