Re: Function returns wrong data after datatype change

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jeff Trout <threshar(at)threshar(dot)is-a-geek(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Function returns wrong data after datatype change
Date: 2007-01-24 17:24:33
Message-ID: 2978.1169659473@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Jeff Trout <threshar(at)threshar(dot)is-a-geek(dot)com> writes:
> I just ran across this, and I do not think it is entirely a PG bug or
> even something that the backend can detect and handle.
> The problem stems from swapping a table definition from under a
> function.

Hmm. This should yield an error (SQL function not returning the type
it claims to), and we probably should plug the hole by invoking
check_sql_fn_retval every time not just at creation.

I thought you were about to complain about plpgsql, which has much worse
problems due to plan caching...

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Jeff Trout 2007-01-24 18:59:21 Re: Function returns wrong data after datatype change
Previous Message Tom Lane 2007-01-24 17:15:04 Re: BUG #2895: Private Use Unicode character crashes server when using ILIKE