Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 8F1E87768F2 for ; Tue, 13 Mar 2012 11:19:51 -0300 (ADT) Received: from mahout.postgresql.org ([98.129.198.123]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1S7SZq-0002CH-TS for pgsql-bugs@postgresql.org; Tue, 13 Mar 2012 14:19:51 +0000 Received: from [204.145.124.246] (helo=wrigleys.postgresql.org) by mahout.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1S7SZe-0007YH-LQ for pgsql-bugs@postgresql.org; Tue, 13 Mar 2012 14:19:38 +0000 Received: from www-data by wrigleys.postgresql.org with local (Exim 4.72) (envelope-from ) id 1S7SZe-00085R-BA for pgsql-bugs@postgresql.org; Tue, 13 Mar 2012 14:19:38 +0000 Date: Tue, 13 Mar 2012 14:19:38 +0000 Message-Id: Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: BUG #6529: Invalid numeric input syntax for 'select into' queries To: pgsql-bugs@postgresql.org From: nehxby@gmail.com X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201203/104 X-Sequence-Number: 32665 The following bug has been logged on the website: Bug reference: 6529 Logged by: Maxim Turchin Email address: nehxby@gmail.com PostgreSQL version: 9.1.3 Operating system: Ubuntu 11.10 Description: = CREATE TYPE test_bug_type AS (value numeric(15,2), currency_id varchar); CREATE TABLE test_bug_table ( id serial PRIMARY KEY, test_field test_bug_type ); INSERT INTO test_bug_table (test_field) VALUES ('(15.50,USD)'); DO $$DECLARE test_bug_var test_bug_type; BEGIN SELECT test_field INTO test_bug_var FROM test_bug_table LIMIT 1; --ERROR: invalid input syntax for type numeric: "(15.50,USD)" --CONTEXT: PL/pgSQL function "inline_code_block" line 7 at SQL statement -- OR: INSERT INTO test_bug_table (test_field) VALUES ('(35.80,EUR)') RETURNING test_field INTO test_bug_var; --ERROR: invalid input syntax for type numeric: "(35.80,EUR)" RAISE NOTICE 'Test %', test_bug_var; END;$$; DROP TABLE test_bug_table; DROP TYPE test_bug_type;