From: Tom Lane <tgl@sss.pgh.pa.us>
To: Ryan Kelly <rpkelly22@gmail.com>
Cc: Vik Reykja <vikreykja@gmail.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: hstore parser incorrectly handles malformed input
Date: Fri, 27 Apr 2012 10:22:11 -0400
Message-ID: <19559.1335536531@sss.pgh.pa.us> (raw)
In-Reply-To: <20120427112235.GA9024@llserver.lakeliving.com>
References: <20120426190513.GB31886@llserver.lakeliving.com>
<12884.1335469833@sss.pgh.pa.us>
<19224.1335489137@sss.pgh.pa.us>
<CALDgxVsZfSoWxHxpzsH22heJqwb6aom5x8kmVVe4WVq-fwTtOQ@mail.gmail.com>
<20120427112235.GA9024@llserver.lakeliving.com>
Ryan Kelly <rpkelly22@gmail.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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, rpkelly22@gmail.com, vikreykja@gmail.com
Subject: Re: hstore parser incorrectly handles malformed input
In-Reply-To: <19559.1335536531@sss.pgh.pa.us>
References: <20120426190513.GB31886@llserver.lakeliving.com> <12884.1335469833@sss.pgh.pa.us> <19224.1335489137@sss.pgh.pa.us> <CALDgxVsZfSoWxHxpzsH22heJqwb6aom5x8kmVVe4WVq-fwTtOQ@mail.gmail.com> <20120427112235.GA9024@llserver.lakeliving.com> <19559.1335536531@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox