Returning types - PL-PgSql functions

Поиск
Список
Период
Сортировка
От Vilson farias
Тема Returning types - PL-PgSql functions
Дата
Msg-id 003b01c20684$7bc011f0$98a0a8c0@dgtac
обсуждение исходный текст
Ответы Re: Returning types - PL-PgSql functions  ("Joshua b. Jore" <josh@greentechnologist.org>)
Список pgsql-general
Greetings,

  I would like to know if it's possible to return a record from a pl-pgsql
function.

  The procedure I did is bellow and of course doesn't work. Is there some
possibility or work-around?

CREATE FUNCTION teste_tmp(INT4)
  RETURNS RECORD AS '
  DECLARE
    rec_tmp record;
  BEGIN
    SELECT
      INTO rec_tmp
      1 as col1, ''teste'' as col2, now() as col3 ;

    RETURN rec_tmp;
  END;
'
LANGUAGE 'plpgsql';

Best regards,

----------------------------------------------------------------------------
----
José Vilson de Mello de Farias
Software Engineer

Dígitro Tecnologia Ltda - www.digitro.com.br
APC - Customer Oriented Applications
E-mail: vilson.farias@digitro.com.br
Tel.: +55 48 281 7158
ICQ 11866179


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Invalid length of startup packet
Следующее
От: "Joshua b. Jore"
Дата:
Сообщение: Re: Returning types - PL-PgSql functions