Re: BUG #3116: attribute has wrong type - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #3116: attribute has wrong type
Date
Msg-id 6798.1173205306@sss.pgh.pa.us
Whole thread Raw
In response to BUG #3116: attribute has wrong type  ("Greg Sabino Mullane" <greg@turnstep.com>)
Responses Re: BUG #3116: attribute has wrong type
List pgsql-bugs
"Greg Sabino Mullane" <greg@turnstep.com> writes:
> CREATE OR REPLACE FUNCTION gregtest(int) RETURNS varchar
> LANGUAGE sql AS $$ SELECT 'abc'::text; $$;

Hm, I'd argue that that should be rejected.  SQL functions currently
demand exact match between the declared return type and their final
SELECT command ... wonder why this case is getting past?

            regards, tom lane

pgsql-bugs by date:

Previous
From: "Greg Sabino Mullane"
Date:
Subject: BUG #3116: attribute has wrong type
Next
From: Tom Lane
Date:
Subject: Re: BUG #3116: attribute has wrong type