Stephan Szabo <[EMAIL PROTECTED]> writes:
> It looks like the problem is that relkind is of the somewhat odd
> PostgreSQL type "char" not an actual char(1), so with the else in there it
> appears to try to force the unknown literals into that type which only
> takes the first character. It will pro
Adam Rich wrote on 01.03.2008 01:02:
"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 i
> "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
On Sat, 1 Mar 2008, Thomas Kellerer wrote:
> I was writing a statement retrieve dependency information out of the
> system catalog, when I noticed something that I didn't expect.
>
> I wanted to use the following statement to "translate" the relkind
> column to a more descriptive value:
>
> selec
> I wanted to use the following statement to "translate" the relkind
> column to a
> more descriptive value:
>
> select c.relname
> case
> when c.relkind in ('t','r') then 'table'
> when c.relkind = 'i' then 'index'
> when c.relkind = 'S' then 'sequence'
>
Hello,
I was writing a statement retrieve dependency information out of the system
catalog, when I noticed something that I didn't expect.
I wanted to use the following statement to "translate" the relkind column to a
more descriptive value:
select c.relname
case
when c.relk