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

Поиск
Список
Период
Сортировка
От Christopher Kings-Lynne
Тема Re: [COMMITTERS] pgsql-server: Clean up generation of default names
Дата
Msg-id 40C90FA5.7090707@familyhealth.com.au
обсуждение исходный текст
Ответы Re: [COMMITTERS] pgsql-server: Clean up generation of default names  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Delaying the planning of unnamed statements until Bind
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [COMMITTERS] pgsql-server: Clean up generation of default names