Relative Content

Tag Archive for jsonpostgresql

Decoding ByteA data in postgresql

Using decode function for decoding a ByteA data.
This runs successfully but some non-english character such as ‘ä’ comes as ‘334’

how to insert an array of json into postgresql column?

create table test (jsonarraycolumn jsonb[]); insert into test values (array[‘{“a”: 45.50, “b”: 10}’, ‘{“a”: 70.50, “b”: 80}’]); I have created a table ‘test’. Trying to insert an array of json: 1st json: ‘{“a”: 45.50, “b”: 10}’ 2nd json: ‘{“a”: 70.50, “b”: 80}’ I am getting the error: SQL Error [42804]: ERROR: column “jsonarraycolumn” is of […]

Wildcard search on multiple JSON fields in Postgres

I have a JSON object in Postgres and I need to dynamically identify values with one or more partial matches. For example, a sample JSON object will look something like this:
{"field1":"abcdef","field2":"defghi","field3":"jklmno"}