Skip site navigation (1) Skip section navigation (2)

Re: Function returns wrong data after datatype change

From: Jeff Trout <threshar(at)torgo(dot)978(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Jeff Trout <threshar(at)threshar(dot)is-a-geek(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: Function returns wrong data after datatype change
Date: 2007-01-24 18:59:21
Message-ID: B14F6CC6-1DA7-4C79-BE99-184850F19162@torgo.978.org (view raw or flat)
Thread:
Lists: pgsql-bugs
On Jan 24, 2007, at 12:24 PM, Tom Lane wrote:

> 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...

The really curious thing is that it does't complain when restoring  
from the dump - or are those error supressed?
--
Jeff Trout <jeff(at)jefftrout(dot)com>
http://www.dellsmartexitin.com/
http://www.stuarthamm.net/




In response to

Responses

pgsql-bugs by date

Next:From: Tom LaneDate: 2007-01-24 19:04:23
Subject: Re: Function returns wrong data after datatype change
Previous:From: Tom LaneDate: 2007-01-24 17:24:33
Subject: Re: Function returns wrong data after datatype change

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group