Re: BUG #11207: empty path will segfault jsonb #>

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Peter Geoghegan <pg(at)heroku(dot)com>, justin(dot)vanwinkle(at)gmail(dot)com, pgsql-bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #11207: empty path will segfault jsonb #>
Date: 2014-08-21 03:36:46
Message-ID: 30218.1408592206@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> On 08/20/2014 10:50 PM, Tom Lane wrote:
>> If you think the latter should be dequoted, we can probably make it so.
>> I'm not entirely convinced that's right though: you could argue that
>> dequoting is a function of the -> operator and we applied zero such
>> operators. (I'm not wedded to that argument, just raising it as food
>> for thought.) Comments?

> This seems backwards. -> and #> return legal json. ->> and #>> return
> text, which is dequoted if the result is a scalar string:

Hm. Okay, if you are thinking of it as a datatype transformation rather
than part of the extraction operation, then it makes sense.

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message eda 2014-08-21 10:12:22 BUG #11233: Wishlist: specify config file directory independently
Previous Message Tom Lane 2014-08-21 03:35:44 Re: BUG #11207: empty path will segfault jsonb #>