Re: Best practice for naming temp table trigger functions - Mailing list pgsql-sql

From Sebastien Flaesch
Subject Re: Best practice for naming temp table trigger functions
Date
Msg-id DBAP191MB12891233EFFBA6A4CC30E420B0099@DBAP191MB1289.EURP191.PROD.OUTLOOK.COM
Whole thread Raw
In response to Re: Best practice for naming temp table trigger functions  ("David G. Johnston" <david.g.johnston@gmail.com>)
Responses Re: Best practice for naming temp table trigger functions
List pgsql-sql

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

pgsql-sql by date:

Previous
From: "Voillequin, Jean-Marc"
Date:
Subject: RE: unique index with several columns
Next
From: Sebastien Flaesch
Date:
Subject: Re: Best practice for naming temp table trigger functions