Server side large object functions
Hi,
The PostgreSQL manual indicates that:
"There are server-side functions callable from SQL that correspond to each
of the client-side functions described above."
In psql I can get the argument data types for lo_open:
development=# \df+ lo_open
List of functions
Schema | Name | Result data type | Argument data types | Volatility
| O
wner | Language | Source code | Description
------------+---------+------------------+---------------------+------------+---
-------+----------+-------------+-------------------
pg_catalog | lo_open | integer | oid, integer | volatile
| po
stgres | internal | lo_open | large object open
(1 row)
But if I try to find the same for lo_read I get:
development=# \df+ lo_read
List of functions
Schema | Name | Result data type | Argument data types | Volatility | Owner
| L
anguage | Source code | Description
--------+------+------------------+---------------------+------------+-------+--
--------+-------------+-------------
(0 rows)
Is there not a server side function for lo_read? If so, how do I determine
the argument types?
My objective it to read a large object into memory as opposed to exporting
it to a disk file.
I'm using version 8.3.3, psqlODBC 8.2.2 and vb.net.
Thanks,
George
George Weaver wrote:
But if I try to find the same for lo_read I get:
development=# \df+ lo_read
alvherre=# \df loread
Listado de funciones
Schema | Nombre | Tipo de dato de salida | Tipos de datos de argumentos
------------+--------+------------------------+------------------------------
pg_catalog | loread | bytea | integer, integer
(1 fila)
HTH,
--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
From: "Alvaro Herrera" <alvherre@commandprompt.com>
George Weaver wrote:
But if I try to find the same for lo_read I get:
development=# \df+ lo_read
alvherre=# \df loread
Listado de funciones
Schema | Nombre | Tipo de dato de salida | Tipos de datos de
argumentos
------------+--------+------------------------+------------------------------
pg_catalog | loread | bytea | integer, integer
(1 fila)
Thanks Alvaro. I didn't think to look for a variation of the function
name...
As an aside, if I do a PostgreSQL Website search for "loread", I get not
hits.
George
George Weaver wrote:
As an aside, if I do a PostgreSQL Website search for "loread", I get not
hits.
Apparently these functions are not documented at all :-( Most of the
chapter on large objects
http://www.postgresql.org/docs/8.3/static/lo-funcs.html
seems predicated on that one will be using libpq and C.
--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.
George Weaver wrote:
My objective it to read a large object into memory as opposed to
exporting it to a disk file.I'm using version 8.3.3, psqlODBC 8.2.2 and vb.net.
If you use Npgsql (.NET library) rather than ODBC - there are functions
for reading large objects into memory.
Howard Cole
www.selestial.com
----- Original Message -----
From: "Howard Cole" <howardnews@selestial.com>
If you use Npgsql (.NET library) rather than ODBC - there are functions
for reading large objects into memory.
Cool!
I've been meaning to have a look at Npgsql - maybe this is the nudge I need!
Thanks,
George