pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Vik Fearing <vik@postgresfriends.org>
To: Tom Lane <tgl@sss.pgh.pa.us>
To: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: David G. Johnston <david.g.johnston@gmail.com>
Cc: Roman Garcia <yzerno@gmail.com>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #17696: Creation of deferrable initially deferred constraint breaks before transaction commit
Date: Sat, 26 Nov 2022 01:13:29 +0100
Message-ID: <7464b4ea-1f3b-b4db-f97c-38957dbee87a@postgresfriends.org> (raw)
In-Reply-To: <3976549.1669344944@sss.pgh.pa.us>
References: <20221124222356.qolurdwwcnxkbjt2@alvherre.pgsql>
	<3976549.1669344944@sss.pgh.pa.us>

On 11/25/22 03:55, Tom Lane wrote:
> On the whole I share David's guess that the cost/benefit ratio of
> making this happen is unattractive.  I might feel impelled to do
> it anyway if somebody could show that the SQL spec requires it ...
> but I bet you'll search for that in vain, because I doubt that the
> SQL spec requires transactional DDL at all.  (There are too many
> influential implementations that would have a problem with that.)

The spec does require transactional DDL (SQL:2016 4.41.1 General 
description of SQL-transactions) but does not allow mixing of DDL and 
DML in the same transaction.  What happens when you do that is 
implementation-defined.

So in this case it would not really matter when the new constraint is 
verified because the user would have no opportunity to fix the data anyway.
-- 
Vik Fearing






view thread (9+ messages)  latest in thread

Message-ID: <7464b4ea-1f3b-b4db-f97c-38957dbee87a@postgresfriends.org>
Permalink:  ../7464b4ea-1f3b-b4db-f97c-38957dbee87a@postgresfriends.org/
Also on:    postgresql.org/message-id/7464b4ea-1f3b-b4db-f97c-38957dbee87a@postgresfriends.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: vik@postgresfriends.org, tgl@sss.pgh.pa.us, alvherre@alvh.no-ip.org, david.g.johnston@gmail.com, yzerno@gmail.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #17696: Creation of deferrable initially deferred constraint breaks before transaction commit
  In-Reply-To: <7464b4ea-1f3b-b4db-f97c-38957dbee87a@postgresfriends.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox