BUG #8630: Planner behavior change between PG 9.0.14 and 9.3.1

From: v(dot)langard(at)auriga(dot)fr
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #8630: Planner behavior change between PG 9.0.14 and 9.3.1
Date: 2013-11-25 15:56:40
Message-ID: E1VkyWe-0000cm-Qz@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 8630
Logged by: Vince
Email address: v(dot)langard(at)auriga(dot)fr
PostgreSQL version: 9.3.1
Operating system: Windows 8
Description:

Using PG 9.0.14, this code returns no error:

create table t_dummy as (
select
null::integer as int_value,
null::timestamp as ts_value
);

create or replace function test(in_text character varying)
returns void as
$$
begin
update t_dummy set
ts_value = in_text::timestamp, -- OK
int_value = in_text::integer -- ERROR
where false;
end;
$$
language plpgsql volatile security definer;

select test('dummy');

Using PG 9.3.1, the code returns error: invalid input syntax for integer:
"dummy"

It seems that the planner try to cast the dummy value, although update
should never be executed. "analyse" only raise error too, and there's no
error for timestamp casting.

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message bricklen 2013-11-25 17:32:58 Re: BUG #8629: Strange resultset when using CTE or a subselect
Previous Message Michael Meskes 2013-11-25 15:42:30 Re: BUG #8611: ECPG: unclosed comment "/*"