X-Original-To: pgsql-interfaces@postgresql.org Received: from mxzilla4.xs4all.nl (mxzilla4.xs4all.nl [194.109.6.48]) by postgresql.org (Postfix) with ESMTP id 3C9B0474E4F for ; Thu, 20 Mar 2003 10:11:29 -0500 (EST) Received: from xs1.xs4all.nl (xs1.xs4all.nl [194.109.3.11]) by mxzilla4.xs4all.nl (8.12.3/8.12.3) with ESMTP id h2KFBWxB030484; Thu, 20 Mar 2003 16:11:32 +0100 (CET) Received: from xs1.xs4all.nl (jtv@localhost.xs4all.nl [127.0.0.1]) by xs1.xs4all.nl (8.12.8/8.11.6) with ESMTP id h2KFBWkD033187; Thu, 20 Mar 2003 16:11:32 +0100 (CET) (envelope-from jtv@xs1.xs4all.nl) Received: (from Unknown UID 8109@localhost) by xs1.xs4all.nl (8.12.8/8.12.8/Submit) id h2KFBVj3033181; Thu, 20 Mar 2003 16:11:31 +0100 (CET) (envelope-from jtv) Date: Thu, 20 Mar 2003 16:11:31 +0100 From: "Jeroen T. Vermeulen" To: =?iso-8859-1?Q?St=E9phane?= Pinel Cc: PostgreSQL-interfaces Subject: Re: Handling Blobs with libpq Message-ID: <20030320151131.GF28190@xs4all.nl> Mail-Followup-To: =?iso-8859-1?Q?St=E9phane?= Pinel , PostgreSQL-interfaces References: <41AAAA03-5ABA-11D7-8432-000A27AFF5D2@noos.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <41AAAA03-5ABA-11D7-8432-000A27AFF5D2@noos.fr> User-Agent: Mutt/1.4i X-Archive-Number: 200303/91 X-Sequence-Number: 3840 On Thu, Mar 20, 2003 at 10:56:44AM +0100, Stéphane Pinel wrote: > > 2- Larges objects (lo_import) > > My main need is storing pictures (like Jpegs etc) or small blobs. Doc > says that (2) is more > appropriate but I need to work with blobs in memory, not from files. You don't _have_ to import them from files--lo_import is just a convenience function for reading a file into memory and writing it to a large object. Just use the other large object functions: lo_open(), lo_creat(), lo_read(), lo_write(), lo_seek(). Jeroen