Re: Problem with trigger function

2021-02-11 Thread David G. Johnston
On Thursday, February 11, 2021, Steve Baldwin wrote: > David, from what I can see of the docs, for 9.6 it is PROCEDURE. It seems > FUNCTION didn't appear until 11. > Indeed. I didn’t pay attention to the version. David J.

Re: Problem with trigger function

2021-02-11 Thread Steve Baldwin
David, from what I can see of the docs, for 9.6 it is PROCEDURE. It seems FUNCTION didn't appear until 11. Steve On Fri, Feb 12, 2021 at 7:05 AM David G. Johnston < david.g.johns...@gmail.com> wrote: > > On Thursday, February 11, 2021, Steve Baldwin > wrote: > >> Try ... EXECUTE PROCEDURE cust

Re: Problem with trigger function

2021-02-11 Thread David G. Johnston
On Thursday, February 11, 2021, Steve Baldwin wrote: > Try ... EXECUTE PROCEDURE customer_num_informix() > FUNCTION, not PROCEDURE David J.

Re: Problem with trigger function

2021-02-11 Thread Dave Cramer
FWIW, messing with serial numbers like this is pretty risky.Sequences have transactional semantics for a reason. Dave Cramer www.postgres.rocks On Thu, 11 Feb 2021 at 14:57, Steve Baldwin wrote: > Try ... EXECUTE PROCEDURE customer_num_informix() > > Steve > > On Fri, Feb 12, 2021 at 6:47 AM J

Re: Problem with trigger function

2021-02-11 Thread Steve Baldwin
Try ... EXECUTE PROCEDURE customer_num_informix() Steve On Fri, Feb 12, 2021 at 6:47 AM James B. Byrne wrote: > I am trying to implement a trigger in a PostgreSQL-9.6.17 database: > > CREATE OR REPLACE FUNCTION customer_num_informix() > RETURNS trigger AS $$ > BEGIN > -- An Aubit/Informix 4

Problem with trigger function

2021-02-11 Thread James B. Byrne
I am trying to implement a trigger in a PostgreSQL-9.6.17 database: CREATE OR REPLACE FUNCTION customer_num_informix() RETURNS trigger AS $$ BEGIN -- An Aubit/Informix 4GL INSERT statement passes the value 0 to Informix -- DBMS for columns that have the SERIAL data type. Informix will then