Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> I'm not certain what you're trying to say, but the above is complete
> nonsense ...
Ah, so it is. I thought someone up-thread said that in this case it
wound up as bpchar; but I see that's not so:
test=# select pg_typeof((select case when true then 'xxx' else
'a'::char(1) end));
pg_typeof
-----------
character
(1 row)
All that's done is to strip off the length.
I guess that since the "char" type is documented as being for internal
use, these issues would only affect those who choose to write queries
against catalog tables or use an internal type in their tables, so I
guess it's not worth going to extremes to make it behave like char.
Given all that, I'll conceed the point, and give a +1 for the error
message.
-Kevin