From: | Thangalin <thangalin(at)gmail(dot)com> |
---|---|
To: | pgadmin-support(at)postgresql(dot)org |
Subject: | Bug: Reverting Return Type |
Date: | 2014-03-21 05:59:27 |
Message-ID: | CAANrE7rZGs58emrPK9xEaCz2kDBr33v8dNvQ_14KXuJp7v9B3A@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgadmin-support |
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.
From | Date | Subject | |
---|---|---|---|
Next Message | Ashesh Vashi | 2014-03-21 06:01:37 | Re: Bug: Reverting Return Type |
Previous Message | Darren Duncan | 2014-03-16 23:40:26 | Re: I'm in a fix... please help quick |