pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Marc Mamin <M.Mamin@intershop.de>
Cc: Joe Conway <mail@joeconway.com>
Cc: pgsql-general <pgsql-general@lists.postgresql.org>
Subject: Re: schema prefixes in default values (was RE: removing "serial" from table definitions).
Date: Mon, 28 Jun 2021 09:34:46 -0400
Message-ID: <150781.1624887286@sss.pgh.pa.us> (raw)
In-Reply-To: <0fd15744721c4d64ae0373429e687e80@intershop.de>
References: <0fd15744721c4d64ae0373429e687e80@intershop.de>

Marc Mamin <M.Mamin@intershop.de> writes:
> it seems that our problem had nothing to do with serial, but with the way schema prefixes are handled in column default values.

> pg_attrdef.adsrc:
>   filled when the defaut value is defined. contains a schema prefix only when required at this creation time. Is constant afterwards.

We removed adsrc a couple of versions back, precisely because it doesn't
track subsequent changes.  Relying on it has been deprecated for a lot
longer than that.

> Moreover a pg_dump->restore might in some cases modify the value of pg_attrdef.adsrc

pg_dump hasn't relied on adsrc since PG 7.2.

			regards, tom lane





view thread (2+ messages)

Message-ID: <150781.1624887286@sss.pgh.pa.us>
Permalink:  ../150781.1624887286@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/150781.1624887286@sss.pgh.pa.us

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: tgl@sss.pgh.pa.us, M.Mamin@intershop.de, mail@joeconway.com
  Subject: Re: schema prefixes in default values (was RE: removing "serial" from table definitions).
  In-Reply-To: <150781.1624887286@sss.pgh.pa.us>
  References: <0fd15744721c4d64ae0373429e687e80@intershop.de> <150781.1624887286@sss.pgh.pa.us>

* 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