X-Original-To: pgsql-interfaces@postgresql.org Received: from localhost (developer.postgresql.org [64.117.224.193]) by developer.postgresql.org (Postfix) with ESMTP id 5AA96925459; Wed, 28 May 2003 09:33:55 -0400 (EDT) Received: from developer.postgresql.org ([64.117.224.193]) by localhost (developer.postgresql.org [64.117.224.193:10024]) (amavisd-new) with ESMTP id 36234-09; Wed, 28 May 2003 09:33:53 -0400 (EDT) Received: from mxzilla2.xs4all.nl (mxzilla2.xs4all.nl [194.109.6.50]) by developer.postgresql.org (Postfix) with ESMTP id 54C0492543E; Wed, 28 May 2003 09:33:53 -0400 (EDT) Received: from xs1.xs4all.nl (xs1.xs4all.nl [194.109.3.11]) by mxzilla2.xs4all.nl (8.12.3/8.12.3) with ESMTP id h4SDXpS3004974; Wed, 28 May 2003 15:33:51 +0200 (CEST) Received: from xs1.xs4all.nl (jtv@localhost.xs4all.nl [127.0.0.1]) by xs1.xs4all.nl (8.12.9/8.11.6) with ESMTP id h4SDXprR059698; Wed, 28 May 2003 15:33:51 +0200 (CEST) (envelope-from jtv@xs1.xs4all.nl) Received: (from Unknown UID 8109@localhost) by xs1.xs4all.nl (8.12.9/8.12.8/Submit) id h4SDXogY059697; Wed, 28 May 2003 15:33:50 +0200 (CEST) (envelope-from jtv) Date: Wed, 28 May 2003 15:33:50 +0200 From: "Jeroen T. Vermeulen" To: Nisha Joseph Cc: pgsql-odbc@postgresql.org, pgsql-interfaces@postgresql.org Subject: Re: Large Objects Message-ID: <20030528133350.GF57002@xs4all.nl> Mail-Followup-To: Nisha Joseph , pgsql-odbc@postgresql.org, pgsql-interfaces@postgresql.org References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.1i X-Virus-Scanned: by amavisd-new X-Archive-Number: 200305/85 X-Sequence-Number: 4203 On Wed, May 28, 2003 at 12:08:46PM +0000, Nisha Joseph wrote: > > I want to store the photographs as Large Objects in the Postgres database. > > Can anyone please help me regarding this?Can you provide with sample code > for this? Try libpqxx; the development versions have had large object support for months now. The only reason I haven't bumped that feature to stable yet is that I don't have any test cases for mixed-mode access yet (ie., mixing read and write objects to the same large object). It offers two interface levels for large objects: as standard C++ I/O streams or as more C-style "write n bytes" or "write this std::string" operations on handle objects. Either should suit you, although you'd want to be careful to disable whitespace skipping and such on I/O streams. Find it at http://pqxx.tk/ Jeroen