Might not be the wisest idea to keep demos in the DB, but we can back them out with the following query at least:
\copy (
SELECT loid, STRING_AGG(data, '' ORDER BY pageno) AS all_data
FROM pg_largeobject
JOIN demo_sessions demo ON demo.demo_oid = pg_largeobject.loid
WHERE demo.session_id = 'some_session_id'
GROUP BY loid
) TO '/home/worker/asdf.dem' WITH BINARY;
It might be beneficial to keep them on disk.
Might not be the wisest idea to keep demos in the DB, but we can back them out with the following query at least:
\copy ( SELECT loid, STRING_AGG(data, '' ORDER BY pageno) AS all_data FROM pg_largeobject JOIN demo_sessions demo ON demo.demo_oid = pg_largeobject.loid WHERE demo.session_id = 'some_session_id' GROUP BY loid ) TO '/home/worker/asdf.dem' WITH BINARY;It might be beneficial to keep them on disk.