[pgAdmin III] #159: Reverse engineering of a function that RETURNS TABLE

Поиск
Список
Период
Сортировка
От pgAdmin Trac
Тема [pgAdmin III] #159: Reverse engineering of a function that RETURNS TABLE
Дата
Msg-id 045.5f22c9277fcd7cebfb3a38af26e76c22@code.pgadmin.org
обсуждение исходный текст
Ответы Re: [pgAdmin III] #159: Reverse engineering of a function that RETURNS TABLE
Re: [pgAdmin III] #159: Reverse engineering of a function that RETURNS TABLE
Список pgadmin-hackers
#159: Reverse engineering of a function that RETURNS TABLE
----------------------+-----------------------------------------------------
 Reporter:  brsa      |       Owner:  dpage
     Type:  bug       |      Status:  new  
 Priority:  minor     |   Milestone:       
Component:  pgadmin   |     Version:  1.10 
 Keywords:  SQL pane  |    Platform:  all  
----------------------+-----------------------------------------------------
 The feature is new in pg 8.4 and a search in trac shows that Ashesh added
 the functionality in changeset 7815 on April, 17th 2009.

 However, the display in the SQL pane of pgAdmin 1.10.2 is wrong. It says
 "RETURNS SETOF record"; OUT parameters are lost.

 Demo:
   -- I say --
 CREATE OR REPLACE FUNCTION f_test()
   RETURNS TABLE (x integer, y text) AS
 $BODY$
 BEGIN

 x := 1; y := 'test'; RETURN NEXT;

 RETURN QUERY SELECT '2'::int4, 'test2'::text;

 END;
 $BODY$
   LANGUAGE 'plpgsql' VOLATILE


   -- pgAmin say --
 CREATE OR REPLACE FUNCTION f_test()
   RETURNS SETOF record AS
 $BODY$
 BEGIN

 x := 1; y := 'test';
 RETURN NEXT;

 RETURN QUERY
 SELECT 2::int4, 'test2'::text;

 END;
 $BODY$
   LANGUAGE 'plpgsql' VOLATILE
   COST 100
   ROWS 1000;
 ALTER FUNCTION f_test() OWNER TO postgres;

--
Ticket URL: <http://code.pgadmin.org/trac/ticket/159>
pgAdmin III <http://code.pgadmin.org/trac/>
pgAdmin III

В списке pgadmin-hackers по дате отправления:

Предыдущее
От: Erwin Brandstetter
Дата:
Сообщение: Re: pgadmin 1.10.2 crashes on start
Следующее
От: Erwin Brandstetter
Дата:
Сообщение: Bug with create function ... RETURNS TABLE