Re: RETURNS SETOF table; language 'sql'

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: RETURNS SETOF table; language 'sql'
Дата
Msg-id 19849.1131573942@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: RETURNS SETOF table; language 'sql'  (Mario Splivalo <mario.splivalo@mobart.hr>)
Ответы Re: RETURNS SETOF table; language 'sql'  (Mario Splivalo <mario.splivalo@mobart.hr>)
Список pgsql-sql
Mario Splivalo <mario.splivalo@mobart.hr> writes:
> Works fine. I remind you again, this is on a newly created database.

Yup, works fine for me too.

> When I run it, again the same:pulitzer2=# select * from
> get_ad_test(1004);
> ERROR:  query-specified return row and actual function return row do not
> match
> pulitzer2=#

Ah, I bet I know the problem:

alter table ads add column z int;
<< function still works ... >>
alter table ads drop column z;
<< function no longer works... >>

7.4 isn't too good about coping with dropped columns in rowtypes.
This problem is fixed in 8.0 and up.
        regards, tom lane


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

Предыдущее
От: Mario Splivalo
Дата:
Сообщение: Re: RETURNS SETOF table; language 'sql'
Следующее
От: Mario Splivalo
Дата:
Сообщение: Re: RETURNS SETOF table; language 'sql'