Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cW2yq-0007SI-Qd for pgsql-hackers@arkaria.postgresql.org; Tue, 24 Jan 2017 15:25:56 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cW2yq-0007TO-DS for pgsql-hackers@arkaria.postgresql.org; Tue, 24 Jan 2017 15:25:56 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cW2xP-0004x9-Fi for pgsql-hackers@postgresql.org; Tue, 24 Jan 2017 15:24:27 +0000 Received: from tamriel.snowman.net ([72.66.115.51]) by makus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cW2xL-0001wf-HZ for pgsql-hackers@postgresql.org; Tue, 24 Jan 2017 15:24:26 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id E53085F796; Tue, 24 Jan 2017 10:23:21 -0500 (EST) Date: Tue, 24 Jan 2017 10:23:21 -0500 From: Stephen Frost To: Peter Eisentraut Cc: pgsql-hackers@postgresql.org Subject: Re: [COMMITTERS] pgsql: Add pg_sequence system catalog Message-ID: <20170124152321.GT18360@tamriel.snowman.net> References: <20170119160305.GS18360@tamriel.snowman.net> <1b722fdc-7f69-9033-2bed-34e318d61a74@2ndquadrant.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="XzFArgmrYSVbm0Kq" Content-Disposition: inline In-Reply-To: <1b722fdc-7f69-9033-2bed-34e318d61a74@2ndquadrant.com> X-Editor: Vim http://www.vim.org/ X-Info: http://www.snowman.net X-Operating-System: Linux/3.13.0-91-generic (x86_64) X-Uptime: 10:11:15 up 199 days, 16:35, 5 users, load average: 0.10, 0.15, 0.17 User-Agent: Mutt/1.5.21 (2010-09-15) X-Pg-Spam-Score: -5.1 (-----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org --XzFArgmrYSVbm0Kq Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Peter, * Peter Eisentraut (peter.eisentraut@2ndquadrant.com) wrote: > On 1/19/17 11:03 AM, Stephen Frost wrote: > > I'd suggest using our usual approach in pg_dump, which is matching based > > on the OID, like so: > >=20 > > WHERE c.oid =3D '%u'::oid > >=20 > > The OID is in: tbinfo->dobj.catId.oid > >=20 > > Also, you should move the selectSourceSchema() into the per-version > > branches and set it to 'pg_catalog' for PG10 and up, which would allow > > you to avoid having to qualify the table names, et al. >=20 > Does the attached patch look correct to you? On a one-over, yes, that looks correct and avoids the issue of running in a user's schema. It wouldn't hurt to add a comment as to why things are so different in PG10 than other versions, ie: /* * In PG10, sequence meta-data was moved into pg_sequence, so switch to * the pg_catalog schema instead of operating in a user schema and pull * the necessary meta-data from there. */ Thanks! Stephen --XzFArgmrYSVbm0Kq Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJYh3FpAAoJEO1sijiDR2RVLCMP/2u7EkRQaMr0lpNeU1IQmHJo 5Vpz3R8VL6WXjhZY7pxwegttkOtekeGKqnewa0SNl94ZfUDUFYYWWHglwI5soGZ6 huPjJJ19OmalRjlIx4WgIkk04ftJ25Shrzzv9C2+t+mhvvhBiauT/YL2kau/7uO3 6EHtJAgkVUvCDczb4kdSWNJCXGmiYd+E5rT2hDS2e9KYQ99KB0BfeQC07CENPaVA vx9GVIFZMnZARZ/1++slxWx4//C8+tiH5GFXuGU09r3EgxovB++Vr4F4iGgu5V/M tXU90xU3v/4HNU9lo5qlocAJTGSCPCcxg8TNdt0vc/UCWgFfwR532W5wIWb+MP8Y 5eZZroM2geaENdHIKhvokRsxz2LApmnoRY3rCB1PCw4o9Gxqk7BaoXUw+MDwcGxk c28ixyKwRy1XPfOdpJovDjbryTaT+veUPSs2R1wFa4QfOZz1LN1BDXAcQtt/q8NU FhmaOXizjnWLAeRWT4EYPzHbodoYoy2xmSBt1rr9lQ4/govHuKKfjAI/fL2p2hqi 6q1zmFWG5tZpCxoG7rtZHrqwzLMU7gKGUaHGmxviJRZX58CFN+/Fwkw/abI6byYr KC8BcJ1spgXTSgrJB61qyUXEyFtxVx0aLJp1diNYWKX3xQ1dvBnz1JgFs/h8agkR 9ewXHOn2wS9p6KSQB1X5 =mifZ -----END PGP SIGNATURE----- --XzFArgmrYSVbm0Kq--