Re: Querying Large Objects - Mailing list pgsql-general

From Albe Laurenz
Subject Re: Querying Large Objects
Date
Msg-id D960CB61B694CF459DCFB4B0128514C202FF654E@exadv11.host.magwien.gv.at
Whole thread Raw
In response to Querying Large Objects  (David Kerr <dmk@mr-paradox.net>)
List pgsql-general
David Kerr wrote:
> I'm having a heck of a time trying to track this down.
> Is it possible to retrive a large object from psql/pgbench?
>
> I don't want just the OID, i want the actual streamed data.
>
> I'm doing a timing comparison between bytea and lo's. So it'd
> be ideal if I can pull it with pgbench.

You can do it with SQL:

SELECT loread(lo_open($1, 262144), 1073741819)

Where $1 is to be replaced with the OID of the large object.

Yours,
Laurenz Albe

pgsql-general by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: Anyone testing changes to libpq/bcc32.mak?
Next
From: "Albe Laurenz"
Date:
Subject: Re: writing c functions for postgres