2010/4/14 Kevin J Bluck <kevin.bluck@netce.com>:
>> 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 no=
t being treated equivalent to char(1). I also see a general problem with RE=
TURNS TABLE disregarding any explicit lengths declared for any character ty=
pe. For example, if you declare a RETURNS TABLE column as VARCHAR(15), it s=
eems to actually consider it as if you had declared it unqualified VARCHAR,=
equivalent to TEXT. Similarly, a column defined as CHAR(2) will also be tr=
eated as unqualified CHAR without an explicit length, with the further prob=
lem reported by Pavel of being treated as unlimited length instead of equiv=
alent to CHAR(1) as expected. In other words, it seems to be effectively im=
possible to declare explicit lengths for RETURNS TABLE character type colum=
ns.
>
> This doesn't happen with the RETURNS SETOF variation, only RETURNS TABLE.
>
> Regards,
RETURNS TABLE (x int, y int) is equal to CREATE FUNCTION foo(.. OUT x
int, OUT y int) RETURNS SETOF RECORD. But PostgreSQL functions ignore
typmod for parameters - so it is not bug, it is feature :(
Pavel Stehule
>
> --- Kevin
>
>
>
>
>
> --
> Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-bugs
>