Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Vkzs4-0001fv-Qv for pgsql-bugs@arkaria.postgresql.org; Mon, 25 Nov 2013 17:22:53 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Vkzs3-0003Mn-9M for pgsql-bugs@arkaria.postgresql.org; Mon, 25 Nov 2013 17:22:51 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VkyWp-0001l7-9O for pgsql-bugs@postgresql.org; Mon, 25 Nov 2013 15:56:51 +0000 Received: from mahout.postgresql.org ([2001:4800:7903:4::123]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VkyWm-0000sl-0J for pgsql-bugs@postgresql.org; Mon, 25 Nov 2013 15:56:51 +0000 Received: from wrigleys.postgresql.org ([204.145.124.246]) by mahout.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VkyWk-0002JT-AS for pgsql-bugs@postgresql.org; Mon, 25 Nov 2013 15:56:47 +0000 Received: from www-data by wrigleys.postgresql.org with local (Exim 4.80) (envelope-from ) id 1VkyWe-0000cm-Qz for pgsql-bugs@postgresql.org; Mon, 25 Nov 2013 15:56:40 +0000 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: BUG #8630: Planner behavior change between PG 9.0.14 and 9.3.1 To: pgsql-bugs@postgresql.org From: v.langard@auriga.fr Message-Id: Date: Mon, 25 Nov 2013 15:56:40 +0000 X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org 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