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

From: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [COMMITTERS] pgsql-server: Clean up generation of default names
Date: 2004-06-11 01:49:25
Message-ID: 40C90FA5.7090707@familyhealth.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers 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

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2004-06-11 03:15:31 Re: [COMMITTERS] pgsql-server: Clean up generation of default names
Previous Message Tom Lane 2004-06-11 01:34:14 Re: pgsql-server: Clean up generation of default names

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2004-06-11 03:15:31 Re: [COMMITTERS] pgsql-server: Clean up generation of default names
Previous Message Tom Lane 2004-06-11 01:34:14 Re: pgsql-server: Clean up generation of default names