|
|
|
|
|
by derefr
1859 days ago
|
|
> Is there even a function that would convert JSON encoded "string" to text it represents in postgresql? I didn't find it. Oddly, no, there's no specific function for taking a root-level scalar JSON term (like '"foo"'::jsonb), and extracting said scalar to its equivalent native Postgres type. You can still do it (for extracting to text, at least), but you have to use a 'vacuous' path-navigation to accomplish it, so it's extremely clumsy, and wastes the potential of the new syntax: SELECT '"foo"'::jsonb #>> (ARRAY[]::text[]);
|
|
Anyway, for fun:
:)