Re: [PATCHES] Proposed patch for sequence-renaming problems

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [PATCHES] Proposed patch for sequence-renaming problems
Дата
Msg-id 9253.1128186149@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [PATCHES] Proposed patch for sequence-renaming problems  (Bruce Momjian <pgman@candle.pha.pa.us>)
Ответы Re: [PATCHES] Proposed patch for sequence-renaming problems  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-hackers
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> Tom Lane wrote:
>> Ripping out ALTER SCHEMA RENAME is not a solution unless you have a path
>> to a solution later with more work.

> Well, we are only giving ourselves a few weeks to solve this, and I
> think a hack to make it work cleanly for users is better than supporting
> two function names perpetually.

Well, if you are dead set on having only one function name, then I think
the best solution is this:
* only one function, taking regclass
* add an implicit text-to-regclass coercion

With this, nextval('foo') is early binding and nextval('foo'::text) is
late binding, and existing dumps are going to continue to behave as late
binding unless changed manually.

The implicit coercion is a bit risky, but in practice these are likely
to be the only functions in the system that are declared to take
regclass, so the odds of the implicit coercion firing unexpectedly seem
low.

Does that sound like a workable compromise?
        regards, tom lane


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: [PATCHES] Proposed patch for sequence-renaming problems
Следующее
От: Tom Lane
Дата:
Сообщение: Re: FW: PGBuildfarm member snake Branch HEAD Status changed