Thread: Bug: Reverting Return Type
Hi, Create a new function that uses a TABLE return type definition: CREATE OR REPLACE FUNCTION testing(IN p_test bigint) RETURNS TABLE (id int) AS $BODY$ SELECT 1 AS id $BODY$ LANGUAGE sql STABLE; Expected Results The return type retains the ID column name and continues to use a TABLE for the result. Actual Results When viewed in pgAdmin3, it becomes: CREATE OR REPLACE FUNCTION testing(IN p_test bigint) RETURNS SETOF integer AS $BODY$ SELECT 1 AS id $BODY$ LANGUAGE sql STABLE COST 100 ROWS 1000; The TABLE return type definition has been replaced. This has no immediate effect on the database, but any subsequent edits to the function through pgAdmin could catch developers unaware.
What version of pgAdmin II are you using?
On Fri, Mar 21, 2014 at 11:29 AM, Thangalin <thangalin@gmail.com> wrote:
Hi,
Create a new function that uses a TABLE return type definition:
CREATE OR REPLACE FUNCTION testing(IN p_test bigint)
RETURNS TABLE (id int) AS
$BODY$
SELECT 1 AS id
$BODY$
LANGUAGE sql STABLE;
Expected Results
The return type retains the ID column name and continues to use a
TABLE for the result.
Actual Results
When viewed in pgAdmin3, it becomes:
CREATE OR REPLACE FUNCTION testing(IN p_test bigint)
RETURNS SETOF integer AS
$BODY$
SELECT 1 AS id
$BODY$
LANGUAGE sql STABLE
COST 100
ROWS 1000;
The TABLE return type definition has been replaced.
This has no immediate effect on the database, but any subsequent edits
to the function through pgAdmin could catch developers unaware.
--
Sent via pgadmin-support mailing list (pgadmin-support@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-support
--
--
Thanks & Regards,
Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company
![](http://s.wisestamp.com/pixel.png?p=mozilla&v=2.0.3&t=1285751372076&u=4060523&e=777)
<div dir="ltr">1.18.1 (Jan 21 2014, REL-1_18_1)<br /><br />Linux 3.2.0-60-generic #91-Ubuntu SMP Wed Feb 19 03:54:44 UTC2014 x86_64 x86_64 x86_64 GNU/Linux<br /><br />Ubuntu Trusty Tahr (development branch) \n \l</div>