Re: schema prefixes in default values (was RE: removing "serial" from table definitions).

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Marc Mamin <M(dot)Mamin(at)intershop(dot)de>
Cc: Joe Conway <mail(at)joeconway(dot)com>, pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: schema prefixes in default values (was RE: removing "serial" from table definitions).
Date: 2021-06-28 13:34:46
Message-ID: 150781.1624887286@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Marc Mamin <M(dot)Mamin(at)intershop(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2021-06-28 14:52:51 Re: WARNING: skipping "pg_database" --- only superuser can analyze it
Previous Message Abraham, Danny 2021-06-28 13:26:25 WARNING: skipping "pg_database" --- only superuser can analyze it