RFC: array literal syntax

From: Joe Conway <mail(at)joeconway(dot)com>
To: "General (PostgreSQL)" <pgsql-general(at)postgresql(dot)org>
Subject: RFC: array literal syntax
Date: 2004-08-07 18:36:47
Message-ID: 4115213F.7070806@joeconway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

In Postgres 7.4 and earlier you can do the following:

select '{{"1 2" x},{3}}'::text[];
text
-----------------
{{"1 2 x"},{3}}
(1 row)

I regard this as a bug, and am contemplating commiting a fix this
weekend against 8.0devel. However it was brought up on HACKERS that
since this has always been allowed, it might be viewed by some as a
feature, not a bug. With the proposed change, it would look like this:

select '{{"1 2" x},{3}}'::text[];
ERROR: malformed array literal: "{{"1 2" x},{3}}"

Any comments for or against calling this a bug? Now's the time to speak
up, particularly if you depend on this as a feature.

Thanks,

Joe

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David Garamond 2004-08-07 20:40:21 Writing regex in PL's
Previous Message Paul Tillotson 2004-08-07 17:25:33 Re: FW: Out of swap space & memory