Re: BUG #11207: empty path will segfault jsonb #> - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #11207: empty path will segfault jsonb #>
Date
Msg-id 30218.1408592206@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #11207: empty path will segfault jsonb #>  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-bugs
Andrew Dunstan <andrew@dunslane.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

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #11207: empty path will segfault jsonb #>
Next
From: eda@waniasset.com
Date:
Subject: BUG #11233: Wishlist: specify config file directory independently