Skip site navigation (1) Skip section navigation (2)

Re: hstore parser incorrectly handles malformed input

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ryan Kelly <rpkelly22(at)gmail(dot)com>
Cc: Vik Reykja <vikreykja(at)gmail(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: hstore parser incorrectly handles malformed input
Date: 2012-04-27 14:22:11
Message-ID: (view raw or whole thread)
Lists: pgsql-bugs
Ryan Kelly <rpkelly22(at)gmail(dot)com> writes:
> 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.

Hm ... I don't agree that keys and values are interchangeable, and
I don't see that empty keys are a good thing (whereas empty values are
clearly a reasonable edge case).  So I think this is going a bit far;
it seems to me it'd be giving up a lot of syntax-error detection
capability in return for some not-actually-helpful symmetry.

On the other hand, I seldom use hstore so I'm probably not the best
person to be judging the appropriateness of these options.  Any other
votes out there?

			regards, tom lane

In response to


pgsql-bugs by date

Next:From: Jeff FrostDate: 2012-04-27 16:07:46
Subject: 9.1.3 backends getting stuck in 'startup'
Previous:From: Simon RiggsDate: 2012-04-27 14:16:04
Subject: Re: BUG #6619: Misleading output from slave when host is not running

Privacy Policy | About PostgreSQL
Copyright © 1996-2015 The PostgreSQL Global Development Group