I'm trying to use the function to_jsonb and create the name:
to_jsonb ('{"key1":" ' || 'text1' || '","key2":" ' || 'text2' || '"}');
But after that I used Objection.js ORM to get data using the query:to_jsonb ('{"key1":" ' || 'text1' || '","key2":" ' || 'text2' || '"}');
2017-11-14 23:09 GMT+01:00 Merlin Moncure <mmoncure@xxxxxxxxx>:
not quite following. Can you paste the query you are trying toOn Tue, Nov 14, 2017 at 3:32 PM, hmidi slim <hmidi.slim2@xxxxxxxxx> wrote:
> I have a column name of type 'jsonb' on my table named product. The format
> of the column:
> name: {"key1": "text1", "key2": "text2"}
>
> When I make a query to fetch data from the table I got this format:
> name: '{"key1": "text1", "key2": "text2"}'
>
> Why does postgresql returns the name such as string type and not jsonb? is
> it a bug or is there something else to add?
execute along with the results vs. expectation? thanks
merlin