Re: BUG #11207: empty path will segfault jsonb #>
От | David G Johnston |
---|---|
Тема | Re: BUG #11207: empty path will segfault jsonb #> |
Дата | |
Msg-id | 1408497518662-5815490.post@n5.nabble.com обсуждение исходный текст |
Ответ на | Re: BUG #11207: empty path will segfault jsonb #> (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: BUG #11207: empty path will segfault jsonb #>
|
Список | pgsql-bugs |
Tom Lane-2 wrote > justin.vanwinkle@ > 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. As there is no immediately obvious way to return the entire LHS when using this operator it doesn't seem that far-fetched to define this as the syntax that would do so - though then there wouldn't be a way to not return the entire LHS without providing a known invalid key (maybe '{NULL}' - what would that do now anyway...) Not that we would necessarily want to duplicate hstore but "hstore -> text[]" seems similar enough to emulate if desired. David J. -- View this message in context: http://postgresql.1045698.n5.nabble.com/BUG-11207-empty-path-will-segfault-jsonb-tp5815469p5815490.html Sent from the PostgreSQL - bugs mailing list archive at Nabble.com.
В списке pgsql-bugs по дате отправления: