Skip site navigation (1) Skip section navigation (2)

enum types and binary queries

From: "Merlin Moncure" <mmoncure(at)gmail(dot)com>
To: "PostgreSQL Hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: enum types and binary queries
Date: 2007-08-30 17:13:17
Message-ID: b42b73150708301013y58eb976bi38dc8acb3471a603@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
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

Responses

pgsql-hackers by date

Next:From: Ron MayerDate: 2007-08-30 17:26:45
Subject: Re: Why is there a tsquery data type?
Previous:From: Oleg BartunovDate: 2007-08-30 17:04:29
Subject: Re: tsearch2, gin and @@@ operator?

pgsql-patches by date

Next:From: Bruce MomjianDate: 2007-08-30 17:28:49
Subject: Re: pg_dump --no-tablespaces patch
Previous:From: Joshua D. DrakeDate: 2007-08-30 17:03:08
Subject: Re: pg_dump --no-tablespaces patch

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group