I would like to store some of rows of data in database to as a JSON (in json
type field) for backup reasons, before transaction is launched.
Something like:
INSERT INTO public.backup (user_id, data) VALUES (1, (SELECT * FROM ...))
Is it possible to do it simple, without parsing select and converting it to JSON in my application?