Re: hstore parser incorrectly handles malformed input

From: Ryan Kelly <rpkelly22(at)gmail(dot)com>
To: Vik Reykja <vikreykja(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: hstore parser incorrectly handles malformed input
Date: 2012-04-27 11:22:35
Message-ID: 20120427112235.GA9024@llserver.lakeliving.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Fri, Apr 27, 2012 at 11:27:03AM +0200, Vik Reykja wrote:
> On Fri, Apr 27, 2012 at 03:12, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> > Does anybody else have an opinion as to which of these solutions is
> > more preferable?
> >
>
> I think all unquoted whitespace should be ignored, so I prefer your
> solution. (note: I haven't actually tested it, I'm going off these emails)
As long as we make it consistent on both sides of the '=>' (and document
it, too), then I don't really care either way. Currently you have to use
quotes to get an empty key, so I thought it natural to that you should
have to quote to get an empty value.

I've attached a modified version of Tom's patch which also allows empty
keys.

>
>
> > And should we regard this as a back-patchable bug
> > fix, or a definition change suitable only for HEAD?
> >
>
> Since this is removing a syntax error and not creating one, I'd say it
> should be safe to backpatch.

-Ryan Kelly

Attachment Content-Type Size
hstore-empty-values-2.patch text/x-diff 1.3 KB

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message sathish 2012-04-27 14:06:42 BUG #6620: Out of memory error
Previous Message Vik Reykja 2012-04-27 09:27:03 Re: hstore parser incorrectly handles malformed input