public inbox for [email protected]  
help / color / mirror / Atom feed
From: Andreas Karlsson <[email protected]>
To: William Bernbaum <[email protected]>
To: [email protected] <[email protected]>
Subject: Re: [PATCH] Fix pg_dump emitting OVERRIDING SYSTEM VALUE for tables with dropped identity columns
Date: Fri, 1 May 2026 09:28:28 +0200
Message-ID: <[email protected]> (raw)
In-Reply-To: <PH0PR18MB44430C10F7431F8D163CDAFFA6202@PH0PR18MB4443.namprd18.prod.outlook.com>
References: <PH0PR18MB44430C10F7431F8D163CDAFFA6202@PH0PR18MB4443.namprd18.prod.outlook.com>

On 4/18/26 01:29, William Bernbaum wrote:
> Hey hackers,
> 
> I’ve encountered a small issue in pg_dump.
> 
> It currently emits OVERRIDING SYSTEM VALUE in INSERTs for
> 
> a table that doesn't have an identity column if it used to have
> 
> a GENERATED ALWAYS AS IDENTITY column that was later dropped.
> 
> [...]
> 
> Patch attached.
> 
> Thoughts?

Nicely spotted and thanks for the patch! Please add it to the currently 
open commitfest (https://commitfest.postgresql.org/59/) so it is not lost.

I have two pieces of feedback:

1. I think the code would be easier to read as

if (!tbinfo->attisdropped[j])
     tbinfo->needs_override = tbinfo->needs_override || 
tbinfo->attidentity[j] == ATTRIBUTE_IDENTITY_ALWAYS;

or even

if (tbinfo->attidentity[j] == ATTRIBUTE_IDENTITY_ALWAYS && 
!tbinfo->attisdropped[j])
     tbinfo->needs_override = true;

since then we do not get such a long line.

2. While I am not personally a fan of that file it would be more 
consistent if the new test was added as part of 002_pg_dump.pl if 
possible. Plus then it would mean that we would not need to create and 
tear down a PostgreSQL cluster.

Andreas







view thread (3+ messages)  latest in thread

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: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: [PATCH] Fix pg_dump emitting OVERRIDING SYSTEM VALUE for tables with dropped identity columns
  In-Reply-To: <[email protected]>

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

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