Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id E0CACB5DBD5 for ; Mon, 8 Aug 2011 17:22:03 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 29259-05 for ; Mon, 8 Aug 2011 20:22:03 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from wwwmaster.postgresql.org (wwwmaster.postgresql.org [217.196.146.204]) by mail.postgresql.org (Postfix) with ESMTP id E1DD1B5DBBF for ; Mon, 8 Aug 2011 17:22:02 -0300 (ADT) Received: from wwwmaster.postgresql.org (wwwmaster.postgresql.org [217.196.146.204]) by wwwmaster.postgresql.org (8.14.3/8.14.3) with ESMTP id p78KM231050529 for ; Mon, 8 Aug 2011 20:22:02 GMT (envelope-from www@wwwmaster.postgresql.org) Received: (from www@localhost) by wwwmaster.postgresql.org (8.14.3/8.14.3/Submit) id p78KM2jZ050528; Mon, 8 Aug 2011 20:22:02 GMT (envelope-from www) Date: Mon, 8 Aug 2011 20:22:02 GMT Message-Id: <201108082022.p78KM2jZ050528@wwwmaster.postgresql.org> To: pgsql-bugs@postgresql.org Subject: BUG #6155: literal definition of arrays with double qoutes leads to error From: "listar" Content-Type: text/plain; charset=utf-8 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 201108/73 X-Sequence-Number: 30885 The following bug has been logged online: Bug reference: 6155 Logged by: listar Email address: listar@mail.ru PostgreSQL version: 8.4.5 Operating system: Gentoo 4.4.4-r2 p1.3, pie-0.4.5 64-bit Description: literal definition of arrays with double qoutes leads to error Details: for example: SELECT ('{string "with" double quotes}'::text[])[1] as value; gives: ERROR: malformed array literal: "{string "with" double quotes}" LINE 1: SELECT ('{string "with" double quotes}'::text[])[1] as value... ^ ********** Error ********** ERROR: malformed array literal: "{string "with" double quotes}" SQL state: 22P02 Character: 9 Expected result: value --------------------------- string "with" double quotes (1 row) I tried to escape input string in different ways, but it wasn't successful =( as I can understood the problem is in "switch" statement in method "ArrayCount(...)" in file \src\backend\utils\adt\arrayfuncs.c (that switch doesn't cover all possible cases)