Re: [COMMITTERS] pgsql-server: Clean up generation of default names - Mailing list pgsql-hackers

From Christopher Kings-Lynne
Subject Re: [COMMITTERS] pgsql-server: Clean up generation of default names
Date
Msg-id 40C90FA5.7090707@familyhealth.com.au
Whole thread Raw
Responses Re: [COMMITTERS] pgsql-server: Clean up generation of default names  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
(moved to -hackers)

> If you use sufficiently long table/field names then different tables
> could truncate to the same generated names, and in that case there's
> some risk of concurrently choosing the same "unique" name.  But I don't
> recall anyone having complained of that since we started using this
> technique for choosing index names, so I'm not very worried.  Basically
> what this commit did was propagate the index naming technique to
> constraints and sequences.

Is it conceivable that different SERIAL sequence names could now be 
generated?

ie.  If I upgrade from 7.4 with a dump that looks like this:

CREATE TABLE blah (id SERIAL
);

COPY ...

SELECT SETVAL('blah_id_seq', 10);

Then if the name given to the id sequence is now different, these dumps 
will not restore.  (In this case it will be the same, I'm just 
illustrating the general problem of hard-coding those sequence names in 
the dump - I've never liked it :) )

Chris



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Delaying the planning of unnamed statements until Bind
Next
From: Tom Lane
Date:
Subject: Re: [COMMITTERS] pgsql-server: Clean up generation of default names