From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Shay Rojansky <roji(at)roji(dot)org> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Fwd: Proper query implementation for Postgresql driver |
Date: | 2014-09-30 06:27:47 |
Message-ID: | 31640.1412058467@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
[ too tired to respond to the other points, but: ]
Shay Rojansky <roji(at)roji(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Kyotaro HORIGUCHI | 2014-09-30 06:35:39 | Re: Escaping from blocked send() reprised. |
Previous Message | Kouhei Kaigai | 2014-09-30 06:27:30 | Re: [v9.5] Custom Plan API |