Initial commit

This commit is contained in:
torsten committed 2026-08-13 18:33:10 +02:00
commit b7d90b9afe
16245 files changed
+3396666

No files matched your search

+23
View File
@@ -0,0 +1,23 @@
-- # $Id$
-- # $HeadURL$
-- # $Author$
CREATE FUNCTION bytea_import(p_path text, OUT p_result bytea) RETURNS bytea
LANGUAGE plpgsql
AS $$
DECLARE
l_oid oid;
r record;
BEGIN
p_result := '';
SELECT lo_import(p_path) INTO l_oid;
for r in ( SELECT data FROM pg_largeobject WHERE loid = l_oid ORDER BY pageno ) loop
p_result = p_result || r.data;
end loop;
perform lo_unlink(l_oid);
END;$$;