42804: structure of query does not match error where using RETURN QUERY

Поиск
Список
Период
Сортировка
От Michal Szymanski
Тема 42804: structure of query does not match error where using RETURN QUERY
Дата
Msg-id 8254631e-61a5-4c03-899f-22fdcf369a46@e23g2000vbe.googlegroups.com
обсуждение исходный текст
Ответы Re: 42804: structure of query does not match error where using RETURN QUERY
Re: 42804: structure of query does not match error where using RETURN QUERY
Список pgsql-bugs
Hi,
We call DB procedure that select rows with given ID it works as simple
SELECT but for future changes we implement as DB procedure (look below
for DB listing). Recently we modified columns in table
cerber.cerber_accoun and after this modification procedure does not
work anymore and it returns
42804: structure of query does not match
It is very strange because we return row of cerber_account in variable
defined as row of cerber_account.
We have tried to restart database but it does not help. Probably
information about old table structure is somewhere cached.

CREATE OR REPLACE FUNCTION cerber.cerber_account_select
(i_cerber_account_id bigint)
  RETURNS SETOF cerber.cerber_account AS
$BODY$
DECLARE
    v_result cerber.cerber_account%ROWTYPE;
BEGIN
    RETURN QUERY SELECT * FROM cerber.cerber_account WHERE
cerber_account_id=i_cerber_account_id;
    RETURN;
END;
$BODY$
  LANGUAGE 'plpgsql' VOLATILE
  COST 100
  ROWS 1000;

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

Предыдущее
От: "Alex"
Дата:
Сообщение: BUG #4798: BitMapAnd never works with gin
Следующее
От: Michal Szymanski
Дата:
Сообщение: Re: 42804: structure of query does not match error where using RETURN QUERY