Re: Querying Large Objects

From: "Albe Laurenz" <laurenz(dot)albe(at)wien(dot)gv(dot)at>
To: "David Kerr *EXTERN*" <dmk(at)mr-paradox(dot)net>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: Querying Large Objects
Date: 2009-04-07 07:03:59
Message-ID: D960CB61B694CF459DCFB4B0128514C202FF654E@exadv11.host.magwien.gv.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Albe Laurenz 2009-04-07 07:16:55 Re: Convert Oracle function to PostgreSQL
Previous Message Magnus Hagander 2009-04-07 07:02:26 Re: Anyone testing changes to libpq/bcc32.mak?