Re: hstore parser incorrectly handles malformed input

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Ryan Kelly <rpkelly22(at)gmail(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: hstore parser incorrectly handles malformed input
Date: 2012-05-08 00:44:23
Message-ID: CA+TgmoYzuJ6noRk-amXVW1vXqVErWRf6_JzpunhgbSQ6nTz5bA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Thu, Apr 26, 2012 at 9:12 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> I wrote:
>> Ryan Kelly <rpkelly22(at)gmail(dot)com> writes:
>>> In my mind, all of these should have been rejected as erroneous input.
>>> To that end, I have attached a patch which causes all of these inputs
>>> to be rejected as invalid.
>
>> Hm, I would have expected all three of these to result in "a" having
>> an empty-string value.  I see nothing in the hstore documentation
>> suggesting that I must write a=>"" or some such to get an empty value,
>
> Attached is an alternative patch that fixes it that way.
>
> Does anybody else have an opinion as to which of these solutions is
> more preferable?  And should we regard this as a back-patchable bug
> fix, or a definition change suitable only for HEAD?

I vote for not back-patching, regardless of exactly what we decide to do here.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Ryan Kelly 2012-05-08 01:15:40 Re: BUG #6629: Creating a gist index fails with "too many LWLocks taken"
Previous Message Robert Haas 2012-05-08 00:40:23 Re: BUG #6624: Tab completion of identifier containing single backslash triggers warnings