enum types and binary queries - Mailing list pgsql-hackers

From Merlin Moncure
Subject enum types and binary queries
Date
Msg-id b42b73150708301013y58eb976bi38dc8acb3471a603@mail.gmail.com
Whole thread Raw
Responses Re: enum types and binary queries  (Andrew Dunstan <andrew@dunslane.net>)
Re: enum types and binary queries  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
I noticed that enums are not available to be queried as binary through
the protocol.  Is this a known issue?  Too late to fix for 8.3?  This
is kind of a pain, because it forces any query that returns an enum to
return the entire result as text.  afaik, enums are the only POD type
to behave this way.

postgres=# create type foo as enum('foo');
CREATE TYPE

postgres=# copy (select 'foo'::foo) to '/home/postgres/foo.txt' binary;
ERROR:  no binary output function available for type foo

merlin


pgsql-hackers by date:

Previous
From: Oleg Bartunov
Date:
Subject: Re: tsearch2, gin and @@@ operator?
Next
From: Ron Mayer
Date:
Subject: Re: Why is there a tsquery data type?