mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
Add server side lo_import(filename, oid) function.
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
<!-- $PostgreSQL: pgsql/doc/src/sgml/lobj.sgml,v 1.47 2008/03/19 00:39:33 ishii Exp $ -->
|
||||
<!-- $PostgreSQL: pgsql/doc/src/sgml/lobj.sgml,v 1.48 2008/03/22 01:55:14 ishii Exp $ -->
|
||||
|
||||
<chapter id="largeObjects">
|
||||
<title id="largeObjects-title">Large Objects</title>
|
||||
@ -422,6 +422,9 @@ SELECT lo_unlink(173454); -- deletes large object with OID 173454
|
||||
INSERT INTO image (name, raster)
|
||||
VALUES ('beautiful image', lo_import('/etc/motd'));
|
||||
|
||||
INSERT INTO image (name, raster) -- same as above, but specify OID to use
|
||||
VALUES ('beautiful image', lo_import('/etc/motd', 68583));
|
||||
|
||||
SELECT lo_export(image.raster, '/tmp/motd') FROM image
|
||||
WHERE name = 'beautiful image';
|
||||
</programlisting>
|
||||
|
Reference in New Issue
Block a user