Re: Dyamic updates of NEW with pl/pgsql

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Dyamic updates of NEW with pl/pgsql
Дата
Msg-id 19387.1268669953@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Dyamic updates of NEW with pl/pgsql  (Merlin Moncure <mmoncure@gmail.com>)
Ответы Re: Dyamic updates of NEW with pl/pgsql  (Merlin Moncure <mmoncure@gmail.com>)
Список pgsql-hackers
Merlin Moncure <mmoncure@gmail.com> writes:
> On Mon, Mar 15, 2010 at 11:37 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> If we make the implementation be such that "(rec->field)::foo" forces
>> a runtime cast to foo (rather than throwing an error if it's not type
>> foo already)

> yeah...explicit cast should always do 'best effort'

Probably so.  But is it worth inventing some other notation that says
"expect this field to be of type foo", with an error rather than runtime
cast if it's not?  If we go with treating the result of -> like UNKNOWN,
then you wouldn't need that in cases where the parser guesses the right
type.  But there are going to be cases where you need to override the
guess without necessarily wanting to buy into a forced conversion.
        regards, tom lane


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

Предыдущее
От: Merlin Moncure
Дата:
Сообщение: Re: Dyamic updates of NEW with pl/pgsql
Следующее
От: Merlin Moncure
Дата:
Сообщение: Re: Dyamic updates of NEW with pl/pgsql