Re: lo wrappers - still working on it

From: Scott Holmes <sholmes(at)pacificnet(dot)net>
To: PG-General <pgsql-general(at)postgresql(dot)org>
Subject: Re: lo wrappers - still working on it
Date: 2001-07-04 14:40:41
Message-ID: 200107041440.HAA01273@scotts.mynetwork.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


> You've written a client-side program, but are trying to use it as a
> server side function. I don't think that'll work. You don't want to be
> using libpq for server side functions. I don't know the Java interface, but
> it seems you are trying to do what is already available via
> lo_import/lo_export functions. Maybe you could explain the interface
> you need a little better. Is it not possible to use the lo_import() and
> lo_export functions that are already available? (Why they are hidden in
> the Programmer's Guide is beyond me...).
>
> SELECT lo_export (<table>.<column>, '/path/to/file') from <table>;
> INSERT INTO <table> (<column>) VALUES (lo_import ('/path/to/file'));
>

I tried this initially, it results in an error and the following warning:

You must have Postgres superuser privilege to use server-side lo_export().
Anyone can use the client-side lo_export provided by libpq.

PostgreSQL has not been installed on any of the client computers and I would
much rather retain the function in an SQL statement capability for this.

> Someone recently suggested using bytea fields for blobs as well...
>
> --
> Eric G. Miller <egm2(at)jps(dot)net>
>

I've been considering bytea, however, I do have some parallel development on
PHP 4 using lo's that work just fine. I have not tried re-writing this stuff
with bytea. The two separate systems do need to utilize the same database.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2001-07-04 14:56:57 Re: Please add to TODO list
Previous Message Richard Huxton 2001-07-04 13:56:06 Re: bit operations