Closed Xylon2 closed 2 years ago
Scratch everything from my last/deleted comment. That's the value that PG returns directly for a json path unless you give it an alias:
playground=# select id, imagemeta->'balance' from playground;
id | ?column?
----+----------
1 | 7.77
(1 row)
playground=# select id, imagemeta->'balance' as balance from playground;
id | balance
----+---------
1 | 7.77
(1 row)
So, if you want to specify the field as an identifier parameter type in the column alias, you could do:
select id, imagemeta->:field as :i:field from playground
Ah, thankyou! So not a bug at-all then.
First off, I'd like to thank the developers for this elegant framework.
I'm wanting to store JSON in postgres using the jsonb type. As an experiment, make the tables using psql:
Now add the following in my HugSQL file:
Now in clojure repl:
Why does the map I get back have such a strange key? Is this a bug?