Re: Bug in CREATE FUNCTION with character type (CONFIRMED BUG) - Mailing list pgsql-bugs

From Kevin J Bluck
Subject Re: Bug in CREATE FUNCTION with character type (CONFIRMED BUG)
Date
Msg-id 7b8eba69d1c4c545a3fa03a5bc0b4b40@netce.com
Whole thread Raw
Responses Re: Bug in CREATE FUNCTION with character type (CONFIRMED BUG)  (Pavel Stehule <pavel.stehule@gmail.com>)
List pgsql-bugs
> I'd certainly call this a bug, if not a couple of different bugs.

There seems to be more. I see a problem not just with unqualified char not =
being treated equivalent to char(1). I also see a general problem with RETU=
RNS TABLE disregarding any explicit lengths declared for any character type=
. For example, if you declare a RETURNS TABLE column as VARCHAR(15), it see=
ms to actually consider it as if you had declared it unqualified VARCHAR, e=
quivalent to TEXT. Similarly, a column defined as CHAR(2) will also be trea=
ted as unqualified CHAR without an explicit length, with the further proble=
m reported by Pavel of being treated as unlimited length instead of equival=
ent to CHAR(1) as expected. In other words, it seems to be effectively impo=
ssible to declare explicit lengths for RETURNS TABLE character type columns.

This doesn't happen with the RETURNS SETOF variation, only RETURNS TABLE.

Regards,

--- Kevin

pgsql-bugs by date:

Previous
From: "cool shower"
Date:
Subject: BUG #5421: pg_attribute broken
Next
From: Pavel Stehule
Date:
Subject: Re: Bug in CREATE FUNCTION with character type (CONFIRMED BUG)