Re: Bug in CREATE FUNCTION with character type (CONFIRMED BUG)
От | Pavel Stehule |
---|---|
Тема | Re: Bug in CREATE FUNCTION with character type (CONFIRMED BUG) |
Дата | |
Msg-id | i2s162867791004140911o52210056w17bcad777f5147e5@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Bug in CREATE FUNCTION with character type (CONFIRMED BUG) ("Kevin J Bluck" <kevin.bluck@netce.com>) |
Ответы |
Re: Bug in CREATE FUNCTION with character type (CONFIRMED BUG)
|
Список | pgsql-bugs |
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 >
В списке pgsql-bugs по дате отправления: