Re: Functions returns to libpq with wrong column split

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Functions returns to libpq with wrong column split
Дата
Msg-id 27718.1318981548@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Functions returns to libpq with wrong column split  (Andy Halsall <halsall_andy@hotmail.com>)
Ответы Re: Functions returns to libpq with wrong column split
Список pgsql-novice
Andy Halsall <halsall_andy@hotmail.com> writes:
> My stored procedure looks like this:

>  CREATE OR REPLACE FUNCTION readnode4(bigint) RETURNS  appexcatdata AS '
>  declare
>  h appexcatdata;
>  begin
>  select INTO h r.user_data, n.system_data FROM relationship r INNER JOIN node_system n ON n.node_id =  r.node_id
WHEREr.node_id = $1 LIMIT 1; 
>  RETURN h;
>  end
>  '
>  language 'plpgsql';

[ which is queried as ]

>                            "SELECT readnode4($1)",

I think you probably want "SELECT * FROM readnode4($1)".  As-is,
you're getting a single composite-type column from the SELECT.

            regards, tom lane

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

Предыдущее
От: Andy Halsall
Дата:
Сообщение: Functions returns to libpq with wrong column split
Следующее
От: Andy Halsall
Дата:
Сообщение: Re: Functions returns to libpq with wrong column split