How can the new record returned from RETURNING to converted to jsonb?
For example something like:
INSERT INTO my_table (a, b, c) VALUES ('a', 'b', 'c')
RETURNING to_jsonb(*);
or
UPDATE my_table SET a = 'a'
RETURNING to_jsonb(*);
or
INSERT INTO my_table (a, b, c) VALUES ('a', 'b', 'c')
ON CONFLICT DO UPDATE SET a = EXCLUDED.a
RETURNING to_jsonb(*);
Thanks in advance