pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: v.langard@auriga.fr
To: pgsql-bugs@postgresql.org
Subject: BUG #8630: Planner behavior change between PG 9.0.14 and 9.3.1
Date: Mon, 25 Nov 2013 15:56:40 +0000
Message-ID: <E1VkyWe-0000cm-Qz@wrigleys.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

The following bug has been logged on the website:

Bug reference:      8630
Logged by:          Vince
Email address:      v.langard@auriga.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.



-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (2+ messages)  latest in thread

Message-ID: <E1VkyWe-0000cm-Qz@wrigleys.postgresql.org>
Permalink:  ../E1VkyWe-0000cm-Qz@wrigleys.postgresql.org/
Also on:    postgresql.org/message-id/E1VkyWe-0000cm-Qz@wrigleys.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: v.langard@auriga.fr
  Subject: Re: BUG #8630: Planner behavior change between PG 9.0.14 and 9.3.1
  In-Reply-To: <E1VkyWe-0000cm-Qz@wrigleys.postgresql.org>
  References: <E1VkyWe-0000cm-Qz@wrigleys.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox