From: nehxby@gmail.com
To: pgsql-bugs@postgresql.org
Subject: BUG #6529: Invalid numeric input syntax for 'select into' queries
Date: Tue, 13 Mar 2012 14:19:38 +0000
Message-ID: <E1S7SZe-00085R-BA@wrigleys.postgresql.org> (raw)
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;
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: nehxby@gmail.com
Subject: Re: BUG #6529: Invalid numeric input syntax for 'select into' queries
In-Reply-To: <E1S7SZe-00085R-BA@wrigleys.postgresql.org>
References: <E1S7SZe-00085R-BA@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