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

Re: Confused about CASE

From: "Adam Rich" <adam(dot)r(at)sbcglobal(dot)net>
To: "'Thomas Kellerer'" <spam_eater(at)gmx(dot)net>,<pgsql-general(at)postgresql(dot)org>
Subject: Re: Confused about CASE
Date: 2008-03-01 00:02:01
Message-ID: 031401c87b2f$79a401d0$6cec0570$@r@sbcglobal.net (view raw or flat)
Thread:
Lists: pgsql-general
> "The data types of all the result expressions must be convertible to a
> single output type."

The type of the field pg_class.relkind appears to be "char" which is
described in the notes as:

The type "char" (note the quotes) is different from char(1) in that it 
only uses one byte of storage. It is internally used in the system catalogs 
as a poor-man's enumeration type.

http://www.postgresql.org/docs/8.3/interactive/datatype-character.html

But one would expect "char" to be "convertible" to text for the purposes
of CASE.  Both implicit and explicit cast to text seems to work fine.





In response to

pgsql-general by date

Next:From: pwDate: 2008-03-01 00:10:11
Subject: Re: Querying Headers
Previous:From: Stephan SzaboDate: 2008-03-01 00:00:17
Subject: Re: Confused about CASE

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