Re: Fwd: Proper query implementation for Postgresql driver

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Fwd: Proper query implementation for Postgresql driver
Дата
Msg-id 31640.1412058467@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Fwd: Proper query implementation for Postgresql driver  (Shay Rojansky <roji@roji.org>)
Список pgsql-hackers
[ too tired to respond to the other points, but: ]

Shay Rojansky <roji@roji.org> writes:
>> It's also possible for a type not to have send/recv functions, i.e. to
>> support text-only use.

> In that case, what would be the behavior of selecting such a type with an
> extended query that specifies "all results in binary"? A PG error?

Yup.
   if (!OidIsValid(pt->typsend))       ereport(ERROR,               (errcode(ERRCODE_UNDEFINED_FUNCTION),
errmsg("no binary output function available for type %s",                       format_type_be(type))));
 

There's an exactly parallel error if you try to send a parameter in
binary when its datatype hasn't got a typreceive function.
        regards, tom lane



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

Предыдущее
От: Shay Rojansky
Дата:
Сообщение: Re: Fwd: Proper query implementation for Postgresql driver
Следующее
От: Kouhei Kaigai
Дата:
Сообщение: Re: [v9.5] Custom Plan API