Incorrect display type of the function result - Mailing list pgadmin-support

From Алексей Лутовинин
Subject Incorrect display type of the function result
Date
Msg-id CAKu6uVasrjfqcMZfbHbrQLwj8rY0-mO7hLk=5TtXiamTq1VOYA@mail.gmail.com
Whole thread Raw
Responses Re: Incorrect display type of the function result  ("Guillermo E. Villanueva" <guillermovil@gmail.com>)
List pgadmin-support
Hello!

pgAdmin 1.20.0 (Dec 16 2014, rev: REL-1_20_0)
OS: Windows 7/64.

Create a function that returns a table with a column "col1":

CREATE OR REPLACE FUNCTION myfunc()
RETURNS TABLE(col1 text) AS
$BODY$
  SELECT 'aaa'::text;
$BODY$
LANGUAGE sql STABLE;

After creating a look at the source code of the function in the object browser:

CREATE OR REPLACE FUNCTION myfunc()
  RETURNS SETOF text AS
$BODY$
  SELECT 'aaa'::text;
$BODY$
  LANGUAGE sql STABLE
  COST 100
  ROWS 1000;

The type of result of the function is shown as "SETOF text" instead "TABLE(col1 text)", column name "col1" is lost.
Despite this, the name of the column "col1" is present in the results:

SELECT * FROM myfunc();

col1      !
text      !
----------+-
aaa       |

Сommand-line utility "psql" returns (\df+) correct value of function type.

pgadmin-support by date:

Previous
From: Wander Nauta
Date:
Subject: Re: pgadmin3 segfaults on leaving context menu
Next
From: "RAMARAJSARAVANAKUMAR"
Date:
Subject: postgres9.4 is very difficult to install in windows 8 64 bit