Re: [PATCHES] Non-colliding auto generated names - Mailing list pgsql-hackers

From Christopher Kings-Lynne
Subject Re: [PATCHES] Non-colliding auto generated names
Date
Msg-id 0a3501c2d97a$2e6c9260$6500a8c0@fhp.internal
Whole thread Raw
Responses Re: [PATCHES] Non-colliding auto generated names
List pgsql-hackers
OK,

I have discovered a problem with my auto-naming patch.  It's do to with
dumping serial columns with pg_dump, eg:

--
-- TOC entry 2 (OID 1004551)
-- Name: users_users; Type: TABLE; Schema: public; Owner: chriskl
--

CREATE TABLE users_users (   userid serial NOT NULL,   firstname character varying(255) NOT NULL,   lastname character
varying(255)NOT NULL,   email character varying(255) NOT NULL
 
);

-- DATA DUMPED HERE

--
-- TOC entry 4 (OID 1004305)
-- Name: users_users_userid_seq; Type: SEQUENCE SET; Schema: public; Owner:
chriskl
--

SELECT pg_catalog.setval ('users_users_userid_seq', 126, true);


How do we fix this problem??  Perhaps instead of a hard-coded sequence
string, we can sub-SELECT for it...?

Chris




pgsql-hackers by date:

Previous
From: Greg Stark
Date:
Subject: Re: request for sql3 compliance for the update command
Next
From: "Dave Page"
Date:
Subject: Re: request for sql3 compliance for the update command