Re: [BUGS] Bug #581: Sequence cannot be deleted

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [BUGS] Bug #581: Sequence cannot be deleted
Дата
Msg-id 24439.1013546889@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [BUGS] Bug #581: Sequence cannot be deleted  (Brent Verner <brent@rcfile.org>)
Ответы Re: [BUGS] Bug #581: Sequence cannot be deleted  (Ian Barwick <barwick@gmx.net>)
Список pgsql-hackers
Brent Verner <brent@rcfile.org> writes:
> ISTM it would make sense to expose the sequence naming logic via
> a builtin function, such as pg_serialseq(table,column)?

That might seem cleaner, but I think there's a hidden gotcha: it nails
down a presumption that the sequence name is a function of the table
name, column name, and nothing else.  So I think it'd actually make it
harder rather than easier for us to make the sorts of changes we might
want to make in future.  (F'r instance, we might add an OID into the
name to prevent collisions.)

I believe that the surprising-name problem will largely go away anyway
as soon as we get around to increasing the default NAMEDATALEN.  With
a decent name length no one would ever see truncation in practice.

Also, of course, what we really want is for SERIAL sequences to get
dropped by themselves when the parent table is dropped, and then users
don't need to know what the generated sequence name is ...
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Brent Verner
Дата:
Сообщение: Re: [BUGS] Bug #581: Sequence cannot be deleted
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Maintaining the list of release changes