Re: jsonb and nested hstore
От | Andrew Dunstan |
---|---|
Тема | Re: jsonb and nested hstore |
Дата | |
Msg-id | 5321ADDB.5030804@dunslane.net обсуждение исходный текст |
Ответ на | Re: jsonb and nested hstore (Greg Stark <stark@mit.edu>) |
Ответы |
Re: jsonb and nested hstore
|
Список | pgsql-hackers |
On 03/13/2014 06:53 AM, Greg Stark wrote: > > I also find it awkward that col->>'prop' returns the json > representation of the property. If it's text that means it's > double-quoted. I would think that a user storing text in a json > property would want a way to pull out the text that json property > represents so he doesn't have to write col->>'prop' = '"foo"' and > doesn't need to strip the quotes (and de-escape the string?) before > displaying the value or passing it through other apis. > ->> returns dequoted text if the value it points to is a plain string. If it's not doing that then that's a bug. andrew=# select jsonb '{"a":"the string"}' -> 'a'; ?column? -------------- "the string" (1 row) andrew=# select jsonb '{"a":"the string"}' ->> 'a' ; ?column? ------------ the string (1 row) cheers andrew
В списке pgsql-hackers по дате отправления: