Re: RETURNS SETOF table; language 'sql'

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: mario(dot)splivalo(at)mobart(dot)hr
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: RETURNS SETOF table; language 'sql'
Date: 2005-11-09 22:05:42
Message-ID: 19849.1131573942@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Mario Splivalo <mario(dot)splivalo(at)mobart(dot)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

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Mario Splivalo 2005-11-09 22:17:04 Re: RETURNS SETOF table; language 'sql'
Previous Message Gregory S. Williamson 2005-11-09 21:47:08 Re: Como ejecutar una funcion insert en plpgsql....