Re: Issues with upserts - Mailing list pgsql-general

From David G. Johnston
Subject Re: Issues with upserts
Date
Msg-id CAKFQuwYNmmaV_FK4CjLOW9nm-JejmPAUHfpiZ=WnSemOuhsx_w@mail.gmail.com
Whole thread Raw
In response to RE: Issues with upserts  (André Hänsel <andre@webkr.de>)
List pgsql-general
On Wed, Jul 13, 2022 at 7:58 AM André Hänsel <andre@webkr.de> wrote:


SELECT last_value FROM t_id_seq;

 

This will yield “8”, showing that new sequence numbers have been generated for each attempt.


Yep, an entire able-to-be-inserted tuple is formed every time.  That requires evaluating defaults so that every column has a value.

David J.

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Issues with upserts
Next
From: Adrian Klaver
Date:
Subject: Re: Issues with upserts