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: pgsql-bugs(at)postgresql(dot)org
Subject: Re: hstore parser incorrectly handles malformed input
Date: 2012-04-27 01:12:17
Message-ID: 19224.1335489137@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
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?

			regards, tom lane


Attachment: hstore-empty-values.patch
Description: text/x-patch (1.8 KB)

In response to

Responses

pgsql-bugs by date

Next:From: Tom LaneDate: 2012-04-27 01:23:30
Subject: Re: log_collector doesn't respond to reloads
Previous:From: Josh BerkusDate: 2012-04-27 01:11:38
Subject: Re: log_collector doesn't respond to reloads

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