Klint Gore wrote:
I'm playing around with storing custom preprocessed data
structures within Large Objects. I'd like to be able to write a
custom function that will, within a query, let me select out
particular bytestrings from the middle of a Large Object (within C, I
think 'lo_lseek' and 'lo_read' would get me what I want).
According to http://www.postgresql.org/docs/8.3/static/lo-funcs.html ,
the functions are server side too
Thanks for the link; still trying to figure out how to use these
functions, though.
The link that you sent suggests that these commands are really only
useful for writing out data to server-side files, which isn't so much
what I want. What I really want is to lo_open a file, then lo_lseek to
a particular address and loread a constant number of bytes (to be
returned as the query result), then lo_close the file.
I'm currently stuck on the easy part: lo_open always returns 0, which
gives me "ERROR: invalid large-object descriptor: 0" when I try to use
it with loread.
Any further thoughts?
Thanks,
Adam
--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general