Re: BUG #18647: INSERT statements execute functions twice. - Mailing list pgsql-bugs

From David G. Johnston
Subject Re: BUG #18647: INSERT statements execute functions twice.
Date
Msg-id CAKFQuwZ10FfSqKvydqijuHJTSAqCZnF2RHkGhCiEZ58S+qk5Bw@mail.gmail.com
Whole thread Raw
In response to BUG #18647: INSERT statements execute functions twice.  (PG Bug reporting form <noreply@postgresql.org>)
List pgsql-bugs
On Wednesday, October 9, 2024, Todd Brandys <brandystodd@gmail.com> wrote:
Here is the CREATE table for party.  It was nothing more than a test table at this time:

CREATE TABLE party (
    uuid uuid NOT NULL,
    date_updated timestamp(0) NOT NULL,
    user_updated     pg_catalog.regrole NOT NULL,
    organization uuid NOT NULL,

    CONSTRAINT pk_party
PRIMARY KEY ( uuid )
);

As an aside, using regrole is not a good idea.  The meaning of the integer that gets saved will change if you perform an upgrade or otherwise have to rebuild the global role catalog table.  User-space should not be storing OID values.

David J. 

pgsql-bugs by date:

Previous
From: PG Bug reporting form
Date:
Subject: BUG #18650: rhel-8-aarch64 yum repository for Postgres 13 is missing repodata
Next
From: Greg Sabino Mullane
Date:
Subject: Re: BUG #18647: INSERT statements execute functions twice.