agora inbox for pgsql-sql@postgresql.org
help / color / mirror / Atom feedFrom: Sebastien Flaesch <sebastien.flaesch@4js.com>
To: David G. Johnston <david.g.johnston@gmail.com>
Cc: pgsql-sql@lists.postgresql.org <pgsql-sql@lists.postgresql.org>
Subject: Re: Best practice for naming temp table trigger functions
Date: Tue, 8 Mar 2022 17:24:18 +0000
Message-ID: <DBAP191MB12891233EFFBA6A4CC30E420B0099@DBAP191MB1289.EURP191.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <CAKFQuwZNZzgpo+P8bF6HG=VMq9ZZaw2kpvpgq1KaaL59NFVUTw@mail.gmail.com>
References: <DBAP191MB128959B0FE1ABE28C04ACDFFB0089@DBAP191MB1289.EURP191.PROD.OUTLOOK.COM>
<DBAP191MB1289C893FE38B9C831465376B0099@DBAP191MB1289.EURP191.PROD.OUTLOOK.COM>
<CAKFQuwZNZzgpo+P8bF6HG=VMq9ZZaw2kpvpgq1KaaL59NFVUTw@mail.gmail.com>
Would it make sense (seems possible!) to create the trigger function in the pg_my_temp_schema() schema ?
create function pg_temp_4.TT1_SRL() returns trigger ...
Same question for sequences... (used in my triggers)
Background: All this stuff is to mimic Informix-style SERIALs.
If PostgreSQL native serial would have options to behave like Informix serial, we would not need triggers on our tables.
With Informix serial/bigserial:
* INSERT with zero value specified for serial column generates a new serial value from underlying sequence.
* INSERT with non-zero value specified for serial column sets that value and automatically increments the underlying sequence.
Seb
view thread (5+ messages) latest in thread
Message-ID: <DBAP191MB12891233EFFBA6A4CC30E420B0099@DBAP191MB1289.EURP191.PROD.OUTLOOK.COM>
Permalink: ../DBAP191MB12891233EFFBA6A4CC30E420B0099@DBAP191MB1289.EURP191.PROD.OUTLOOK.COM/
Also on: postgresql.org/message-id/DBAP191MB12891233EFFBA6A4CC30E420B0099@DBAP191MB1289.EURP191.PROD.OUTLOOK.COM
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-sql@postgresql.org
Cc: sebastien.flaesch@4js.com, david.g.johnston@gmail.com, pgsql-sql@lists.postgresql.org
Subject: Re: Best practice for naming temp table trigger functions
In-Reply-To: <DBAP191MB12891233EFFBA6A4CC30E420B0099@DBAP191MB1289.EURP191.PROD.OUTLOOK.COM>
* 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