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

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

justin(dot)vanwinkle(at)gmail(dot)com writes:
> select '{"a": {"b":{"c": "foo"}}}'::jsonb #> '{}';
> [ dumps core ]

Hm. It's not immediately obvious to me what this should be defined to do;
should it throw an error, or return the complete LHS object, or perhaps
return a NULL? But the author of get_jsonb_path_all() evidently didn't
consider the case.

Easy enough to fix once we settle on a definition.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message David G Johnston 2014-08-20 01:18:38 Re: BUG #11207: empty path will segfault jsonb #>
Previous Message Tom Lane 2014-08-19 22:20:03 Re: BUG #11211: regexp_matches acts like a WHERE