Re: A trigger in an extension

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Olleg Samoylov <splarv(at)ya(dot)ru>
Cc: pgsql-admin(at)lists(dot)postgresql(dot)org
Subject: Re: A trigger in an extension
Date: 2025-02-20 19:30:10
Message-ID: 2790099.1740079810@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Olleg Samoylov <splarv(at)ya(dot)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

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Олег Самойлов 2025-02-20 19:43:56 Re: A trigger in an extension
Previous Message Olleg Samoylov 2025-02-20 19:23:18 A trigger in an extension