agora inbox for pgsql-admin@postgresql.org  
help / color / mirror / Atom feed
From: Олег Самойлов <splarv@ya.ru>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-admin@lists.postgresql.org <pgsql-admin@lists.postgresql.org>
Subject: Re: A trigger in an extension
Date: Thu, 20 Feb 2025 22:43:56 +0300
Message-ID: <1276821740080203@mail.yandex.ru> (raw)
In-Reply-To: <2790099.1740079810@sss.pgh.pa.us>
References: <40129c90-138c-4331-a3d6-c04158cb91e0@ya.ru>
	<2790099.1740079810@sss.pgh.pa.us>

<div>Olleg Samoylov &lt;<a href="mailto:splarv@ya.ru" rel="noopener noreferrer">splarv@ya.ru</a>&gt; writes:</div><blockquote><blockquote> I have the extension pgpro_scheduler. In the exception there are two<br /> tables and the trigger on one of them that write to the other. I was<br /> surprised but when I load dump created by pg_dump this trigger is<br /> created in the pre-data stage (automatically by create extension) early<br /> and thus has wrong behavior when uploaded data in the data stage (lead<br /> to duplication of primary key).</blockquote><p><br />pg_dump does not like to editorialize on the contents of extensions.<br />It just does CREATE EXTENSION and doesn't inquire into what's in<br />them.</p></blockquote><div> </div><div>I saw this.</div><div> </div><blockquote><p>I'd argue that if you need triggers like this, maybe you should rethink your data model.<br />                        regards, tom lane</p></blockquote><div> </div><div>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.</div><div> </div><div>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?</div><blockquote> </blockquote>

view thread (4+ messages)  latest in thread

Message-ID: <1276821740080203@mail.yandex.ru>
Permalink:  ../1276821740080203@mail.yandex.ru/
Also on:    postgresql.org/message-id/1276821740080203@mail.yandex.ru

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: splarv@ya.ru, tgl@sss.pgh.pa.us, pgsql-admin@lists.postgresql.org
  Subject: Re: A trigger in an extension
  In-Reply-To: <1276821740080203@mail.yandex.ru>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox