| From: | Sebastien Flaesch <sebastien(dot)flaesch(at)4js(dot)com> |
|---|---|
| To: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
| Cc: | "pgsql-sql(at)lists(dot)postgresql(dot)org" <pgsql-sql(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: Best practice for naming temp table trigger functions |
| Date: | 2022-03-08 17:24:18 |
| Message-ID: | DBAP191MB12891233EFFBA6A4CC30E420B0099@DBAP191MB1289.EURP191.PROD.OUTLOOK.COM |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Sebastien Flaesch | 2022-03-09 08:26:30 | Re: Best practice for naming temp table trigger functions |
| Previous Message | Voillequin, Jean-Marc | 2022-03-08 16:59:08 | RE: unique index with several columns |