Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lxrPg-00078h-S4 for pgsql-general@arkaria.postgresql.org; Mon, 28 Jun 2021 13:35:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lxrPf-00060C-SR for pgsql-general@arkaria.postgresql.org; Mon, 28 Jun 2021 13:34:59 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lxrPf-0005zy-Jb for pgsql-general@lists.postgresql.org; Mon, 28 Jun 2021 13:34:59 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lxrPd-0002y9-IY for pgsql-general@lists.postgresql.org; Mon, 28 Jun 2021 13:34:58 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 15SDYkQL150782; Mon, 28 Jun 2021 09:34:47 -0400 From: Tom Lane To: Marc Mamin cc: Joe Conway , pgsql-general Subject: Re: schema prefixes in default values (was RE: removing "serial" from table definitions). In-reply-to: <0fd15744721c4d64ae0373429e687e80@intershop.de> References: <0fd15744721c4d64ae0373429e687e80@intershop.de> Comments: In-reply-to Marc Mamin message dated "Mon, 28 Jun 2021 10:50:23 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <150780.1624887286.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Mon, 28 Jun 2021 09:34:46 -0400 Message-ID: <150781.1624887286@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Marc Mamin writes: > it seems that our problem had nothing to do with serial, but with the wa= y 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_a= ttrdef.adsrc pg_dump hasn't relied on adsrc since PG 7.2. regards, tom lane