Re: proposal: early casting in plpgsql

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: proposal: early casting in plpgsql
Дата
Msg-id 14013.1243534359@sss.pgh.pa.us
обсуждение исходный текст
Ответ на proposal: early casting in plpgsql  (Pavel Stehule <pavel.stehule@gmail.com>)
Ответы Re: proposal: early casting in plpgsql  (Pavel Stehule <pavel.stehule@gmail.com>)
Список pgsql-hackers
Pavel Stehule <pavel.stehule@gmail.com> writes:
> I propose for types with typmod -1 early casting - etc casting to
> target type on planner level. We cannot use this method for defined
> typmod, because we would to raise exception for following situation:

What existing coding habits will this break?  People have long been
accustomed to use plpgsql for end-runs around SQL casting behavior,
so I'm not really convinced by the idea that "make it more like SQL"
is automatically a good thing.

Also, it seems bizarre and inconsistent that it would work one way
for variables with a typmod and an entirely different way for those
without.  How will you explain that to users who never heard of a
typmod?
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: PostgreSQL Developer meeting minutes up
Следующее
От: Greg Stark
Дата:
Сообщение: Re: search_path vs extensions