Thread: libpqxx Large Objects

libpqxx Large Objects

From
"Key88 SF"
Date:
I was looking for support for Large Objects with libpqxx, but couldn't find 
anything special. Does that mean I need to use the libpq large-object 
functions? Any plans for adding LO support in the future?

Thanks,

Dave


_________________________________________________________________
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE* 
http://join.msn.com/?page=features/virus



Re: libpqxx Large Objects

From
"Jeroen T. Vermeulen"
Date:
On Wed, Jan 08, 2003 at 09:00:07AM +0000, Key88 SF wrote:
> 
> I was looking for support for Large Objects with libpqxx, but couldn't find 
> anything special. Does that mean I need to use the libpq large-object 
> functions? Any plans for adding LO support in the future?

AFAIK libpq's large object support is itself obsolete.  Documentation
suggests the functionality has been integrated in regular tables.


Jeroen



Re: libpqxx Large Objects

From
"Key88 SF"
Date:

Really? Where do you see that? I'm looking at the libpq - C library 
documentation, section 2, describing large objects. I don't see any  mention 
of the interface being deprecated.

-Dave




>From: "Jeroen T. Vermeulen" <jtv@xs4all.nl>
>To: Key88 SF <key88sf@hotmail.com>
>CC: pgsql-interfaces@postgresql.org
>Subject: Re: [INTERFACES] libpqxx Large Objects
>Date: Wed, 8 Jan 2003 18:30:29 +0100
>MIME-Version: 1.0
>Received: from mc2-f16.law16.hotmail.com ([65.54.237.23]) by 
>mc2-s5.law16.hotmail.com with Microsoft SMTPSVC(5.0.2195.5600); Wed, 8 Jan 
>2003 09:30:41 -0800
>Received: from relay2.pgsql.com ([64.49.215.143]) by 
>mc2-f16.law16.hotmail.com with Microsoft SMTPSVC(5.0.2195.5600); Wed, 8 Jan 
>2003 09:30:41 -0800
>Received: from postgresql.org (postgresql.org [64.49.215.8])by 
>relay2.pgsql.com (Postfix) with ESMTPid 5C18BEE1718; Wed,  8 Jan 2003 
>12:30:32 -0500 (EST)
>Received: from localhost (postgresql.org [64.49.215.8])by postgresql.org 
>(Postfix) with ESMTP id F3192475F34for <pgsql-interfaces@postgresql.org>; 
>Wed,  8 Jan 2003 12:30:28 -0500 (EST)
>Received: from mxzilla3.xs4all.nl (mxzilla3.xs4all.nl [194.109.6.49])by 
>postgresql.org (Postfix) with ESMTP id 115B5475EB2for 
><pgsql-interfaces@postgresql.org>; Wed,  8 Jan 2003 12:30:28 -0500 (EST)
>Received: from xs1.xs4all.nl (xs1.xs4all.nl [194.109.3.11])by 
>mxzilla3.xs4all.nl (8.12.3/8.12.3) with ESMTP id h08HUTbn061180;Wed, 8 Jan 
>2003 18:30:30 +0100 (CET)
>Received: (from jtv@localhost)by xs1.xs4all.nl (8.11.6/8.11.6) id 
>h08HUTk80001;Wed, 8 Jan 2003 18:30:29 +0100 (CET)(envelope-from jtv)
>Message-ID: <20030108173029.GA62724@xs4all.nl>
>Mail-Followup-To: Key88 SF 
><key88sf@hotmail.com>,pgsql-interfaces@postgresql.org
>References: <F51y8sujox4HXYaXC6d00002a7f@hotmail.com>
>In-Reply-To: <F51y8sujox4HXYaXC6d00002a7f@hotmail.com>
>User-Agent: Mutt/1.4i
>X-Virus-Scanned: by AMaViS new-20020517
>Precedence: bulk
>Sender: pgsql-interfaces-owner@postgresql.org
>Return-Path: pgsql-interfaces-owner+M3543@postgresql.org
>X-OriginalArrivalTime: 08 Jan 2003 17:30:41.0184 (UTC) 
>FILETIME=[AA88CA00:01C2B73B]
>
>On Wed, Jan 08, 2003 at 09:00:07AM +0000, Key88 SF wrote:
> >
> > I was looking for support for Large Objects with libpqxx, but couldn't 
>find
> > anything special. Does that mean I need to use the libpq large-object
> > functions? Any plans for adding LO support in the future?
>
>AFAIK libpq's large object support is itself obsolete.  Documentation
>suggests the functionality has been integrated in regular tables.
>
>
>Jeroen
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 4: Don't 'kill -9' the postmaster


_________________________________________________________________
Help STOP SPAM: Try the new MSN 8 and get 2 months FREE* 
http://join.msn.com/?page=features/junkmail



Re: libpqxx Large Objects

From
"Jeroen T. Vermeulen"
Date:
On Thu, Jan 09, 2003 at 12:23:18AM +0000, Key88 SF wrote:
> 
> Really? Where do you see that? I'm looking at the libpq - C library 
> documentation, section 2, describing large objects. I don't see any  
> mention of the interface being deprecated.

It doesn't seem to be documented there, no.  I've no time to dig it
up now (I'll be on a holiday for the coming week) so you may just want 
to search the site.  Or just see if postgres will handle the kind of
object size you need as native table data.

BTW, yes, libpq++ had notional large-object support--but that was
never actually fully functional, from what I hear.

Jeroen



Re: libpqxx Large Objects

From
"Key88 SF"
Date:
Just FYI, I just tried the Win32 build (VS .NET compiler), and had to change 
two things to make it compile:

In config.h:

#define NO_PARTIAL_CLASS_TEMPLATE_SPECIALISATION


In util.h:

#define snprintf _snprintf


>From: "Jeroen T. Vermeulen" <jtv@xs4all.nl>
>To: Key88 SF <key88sf@hotmail.com>
>CC: pgsql-interfaces@postgresql.org
>Subject: Re: [INTERFACES] libpqxx Large Objects
>Date: Thu, 9 Jan 2003 03:34:43 +0100
>MIME-Version: 1.0
>Received: from mc4-f38.law16.hotmail.com ([65.54.237.173]) by 
>mc4-s12.law16.hotmail.com with Microsoft SMTPSVC(5.0.2195.5600); Wed, 8 Jan 
>2003 18:34:59 -0800
>Received: from relay2.pgsql.com ([64.49.215.143]) by 
>mc4-f38.law16.hotmail.com with Microsoft SMTPSVC(5.0.2195.5600); Wed, 8 Jan 
>2003 18:34:59 -0800
>Received: from postgresql.org (postgresql.org [64.49.215.8])by 
>relay2.pgsql.com (Postfix) with ESMTPid B6D40EE0A9D; Wed,  8 Jan 2003 
>21:34:51 -0500 (EST)
>Received: from localhost (postgresql.org [64.49.215.8])by postgresql.org 
>(Postfix) with ESMTP id A492E4758C9for <pgsql-interfaces@postgresql.org>; 
>Wed,  8 Jan 2003 21:34:42 -0500 (EST)
>Received: from mxzilla2.xs4all.nl (mxzilla2.xs4all.nl [194.109.6.50])by 
>postgresql.org (Postfix) with ESMTP id D5D52474E42for 
><pgsql-interfaces@postgresql.org>; Wed,  8 Jan 2003 21:34:41 -0500 (EST)
>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 h092YhQV002899;Thu, 9 Jan 
>2003 03:34:43 +0100 (CET)
>Received: (from jtv@localhost)by xs1.xs4all.nl (8.11.6/8.11.6) id 
>h092Yhl01524;Thu, 9 Jan 2003 03:34:43 +0100 (CET)(envelope-from jtv)
>Message-ID: <20030109023443.GC80851@xs4all.nl>
>Mail-Followup-To: Key88 SF 
><key88sf@hotmail.com>,pgsql-interfaces@postgresql.org
>References: <F181CJLgRkQ9ZPWv1QJ000270f6@hotmail.com>
>In-Reply-To: <F181CJLgRkQ9ZPWv1QJ000270f6@hotmail.com>
>User-Agent: Mutt/1.4i
>X-Virus-Scanned: by AMaViS new-20020517
>Precedence: bulk
>Sender: pgsql-interfaces-owner@postgresql.org
>Return-Path: pgsql-interfaces-owner+M3551@postgresql.org
>X-OriginalArrivalTime: 09 Jan 2003 02:34:59.0675 (UTC) 
>FILETIME=[B4830AB0:01C2B787]
>
>On Thu, Jan 09, 2003 at 12:23:18AM +0000, Key88 SF wrote:
> >
> > Really? Where do you see that? I'm looking at the libpq - C library
> > documentation, section 2, describing large objects. I don't see any
> > mention of the interface being deprecated.
>
>It doesn't seem to be documented there, no.  I've no time to dig it
>up now (I'll be on a holiday for the coming week) so you may just want
>to search the site.  Or just see if postgres will handle the kind of
>object size you need as native table data.
>
>BTW, yes, libpq++ had notional large-object support--but that was
>never actually fully functional, from what I hear.
>
>Jeroen
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)


_________________________________________________________________
MSN 8 with e-mail virus protection service: 2 months FREE* 
http://join.msn.com/?page=features/virus



Re: libpqxx Large Objects

From
"Key88 SF"
Date:
I just tried a simple test program, and I'm getting a runtime exception 
thrown from the internal call to PQexec(). I'm going to try and find out 
what's wrong, but was wondering if anyone knows why this is happening before 
I start digging through libpq now.

My setup is:
PostgreSQL running on Linux box.
Test app with libpqxx running on Win32. Connects via TCP/IP to the database 
over my LAN.



>From: "Jeroen T. Vermeulen" <jtv@xs4all.nl>
>To: Key88 SF <key88sf@hotmail.com>
>CC: pgsql-interfaces@postgresql.org
>Subject: Re: [INTERFACES] libpqxx Large Objects
>Date: Thu, 9 Jan 2003 03:34:43 +0100
>MIME-Version: 1.0
>Received: from mc4-f38.law16.hotmail.com ([65.54.237.173]) by 
>mc4-s12.law16.hotmail.com with Microsoft SMTPSVC(5.0.2195.5600); Wed, 8 Jan 
>2003 18:34:59 -0800
>Received: from relay2.pgsql.com ([64.49.215.143]) by 
>mc4-f38.law16.hotmail.com with Microsoft SMTPSVC(5.0.2195.5600); Wed, 8 Jan 
>2003 18:34:59 -0800
>Received: from postgresql.org (postgresql.org [64.49.215.8])by 
>relay2.pgsql.com (Postfix) with ESMTPid B6D40EE0A9D; Wed,  8 Jan 2003 
>21:34:51 -0500 (EST)
>Received: from localhost (postgresql.org [64.49.215.8])by postgresql.org 
>(Postfix) with ESMTP id A492E4758C9for <pgsql-interfaces@postgresql.org>; 
>Wed,  8 Jan 2003 21:34:42 -0500 (EST)
>Received: from mxzilla2.xs4all.nl (mxzilla2.xs4all.nl [194.109.6.50])by 
>postgresql.org (Postfix) with ESMTP id D5D52474E42for 
><pgsql-interfaces@postgresql.org>; Wed,  8 Jan 2003 21:34:41 -0500 (EST)
>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 h092YhQV002899;Thu, 9 Jan 
>2003 03:34:43 +0100 (CET)
>Received: (from jtv@localhost)by xs1.xs4all.nl (8.11.6/8.11.6) id 
>h092Yhl01524;Thu, 9 Jan 2003 03:34:43 +0100 (CET)(envelope-from jtv)
>Message-ID: <20030109023443.GC80851@xs4all.nl>
>Mail-Followup-To: Key88 SF 
><key88sf@hotmail.com>,pgsql-interfaces@postgresql.org
>References: <F181CJLgRkQ9ZPWv1QJ000270f6@hotmail.com>
>In-Reply-To: <F181CJLgRkQ9ZPWv1QJ000270f6@hotmail.com>
>User-Agent: Mutt/1.4i
>X-Virus-Scanned: by AMaViS new-20020517
>Precedence: bulk
>Sender: pgsql-interfaces-owner@postgresql.org
>Return-Path: pgsql-interfaces-owner+M3551@postgresql.org
>X-OriginalArrivalTime: 09 Jan 2003 02:34:59.0675 (UTC) 
>FILETIME=[B4830AB0:01C2B787]
>
>On Thu, Jan 09, 2003 at 12:23:18AM +0000, Key88 SF wrote:
> >
> > Really? Where do you see that? I'm looking at the libpq - C library
> > documentation, section 2, describing large objects. I don't see any
> > mention of the interface being deprecated.
>
>It doesn't seem to be documented there, no.  I've no time to dig it
>up now (I'll be on a holiday for the coming week) so you may just want
>to search the site.  Or just see if postgres will handle the kind of
>object size you need as native table data.
>
>BTW, yes, libpq++ had notional large-object support--but that was
>never actually fully functional, from what I hear.
>
>Jeroen
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)


_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 2 months FREE*. 
http://join.msn.com/?page=features/featuredemail



Re: libpqxx Large Objects

From
"Key88 SF"
Date:
In order to call the large object functions, one needs to be able to get the 
PGconn connection object contained within a Connection object. Could a 
simple accessor method be added for the next revision?

Thanks.

>From: "Jeroen T. Vermeulen" <jtv@xs4all.nl>
>To: Key88 SF <key88sf@hotmail.com>
>CC: pgsql-interfaces@postgresql.org
>Subject: Re: [INTERFACES] libpqxx Large Objects
>Date: Thu, 9 Jan 2003 03:34:43 +0100
>MIME-Version: 1.0
>Received: from mc4-f38.law16.hotmail.com ([65.54.237.173]) by 
>mc4-s12.law16.hotmail.com with Microsoft SMTPSVC(5.0.2195.5600); Wed, 8 Jan 
>2003 18:34:59 -0800
>Received: from relay2.pgsql.com ([64.49.215.143]) by 
>mc4-f38.law16.hotmail.com with Microsoft SMTPSVC(5.0.2195.5600); Wed, 8 Jan 
>2003 18:34:59 -0800
>Received: from postgresql.org (postgresql.org [64.49.215.8])by 
>relay2.pgsql.com (Postfix) with ESMTPid B6D40EE0A9D; Wed,  8 Jan 2003 
>21:34:51 -0500 (EST)
>Received: from localhost (postgresql.org [64.49.215.8])by postgresql.org 
>(Postfix) with ESMTP id A492E4758C9for <pgsql-interfaces@postgresql.org>; 
>Wed,  8 Jan 2003 21:34:42 -0500 (EST)
>Received: from mxzilla2.xs4all.nl (mxzilla2.xs4all.nl [194.109.6.50])by 
>postgresql.org (Postfix) with ESMTP id D5D52474E42for 
><pgsql-interfaces@postgresql.org>; Wed,  8 Jan 2003 21:34:41 -0500 (EST)
>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 h092YhQV002899;Thu, 9 Jan 
>2003 03:34:43 +0100 (CET)
>Received: (from jtv@localhost)by xs1.xs4all.nl (8.11.6/8.11.6) id 
>h092Yhl01524;Thu, 9 Jan 2003 03:34:43 +0100 (CET)(envelope-from jtv)
>Message-ID: <20030109023443.GC80851@xs4all.nl>
>Mail-Followup-To: Key88 SF 
><key88sf@hotmail.com>,pgsql-interfaces@postgresql.org
>References: <F181CJLgRkQ9ZPWv1QJ000270f6@hotmail.com>
>In-Reply-To: <F181CJLgRkQ9ZPWv1QJ000270f6@hotmail.com>
>User-Agent: Mutt/1.4i
>X-Virus-Scanned: by AMaViS new-20020517
>Precedence: bulk
>Sender: pgsql-interfaces-owner@postgresql.org
>Return-Path: pgsql-interfaces-owner+M3551@postgresql.org
>X-OriginalArrivalTime: 09 Jan 2003 02:34:59.0675 (UTC) 
>FILETIME=[B4830AB0:01C2B787]
>
>On Thu, Jan 09, 2003 at 12:23:18AM +0000, Key88 SF wrote:
> >
> > Really? Where do you see that? I'm looking at the libpq - C library
> > documentation, section 2, describing large objects. I don't see any
> > mention of the interface being deprecated.
>
>It doesn't seem to be documented there, no.  I've no time to dig it
>up now (I'll be on a holiday for the coming week) so you may just want
>to search the site.  Or just see if postgres will handle the kind of
>object size you need as native table data.
>
>BTW, yes, libpq++ had notional large-object support--but that was
>never actually fully functional, from what I hear.
>
>Jeroen
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)


_________________________________________________________________
MSN 8 with e-mail virus protection service: 2 months FREE* 
http://join.msn.com/?page=features/virus



Re: libpqxx Large Objects

From
"Jeroen T. Vermeulen"
Date:
On Thu, Jan 09, 2003 at 11:09:58PM +0000, Key88 SF wrote:
> In order to call the large object functions, one needs to be able to get 
> the PGconn connection object contained within a Connection object. Could a 
> simple accessor method be added for the next revision?

I'd rather add a special-purpose large object interface than provide
a getter that breaks open the whole abstraction level.  What libpqxx
does underneath its interface is not always simple, and it depends on
provable properties that may not remain provable if the PGconn is
exposed.  Besides, this kind of accessor would eventually come back
to haunt me.


Jeroen



Re: libpqxx Large Objects

From
"Jeroen T. Vermeulen"
Date:
On Thu, Jan 09, 2003 at 06:04:14PM +0000, Key88 SF wrote:
> 
> I just tried a simple test program, and I'm getting a runtime exception 
> thrown from the internal call to PQexec(). I'm going to try and find out 
> what's wrong, but was wondering if anyone knows why this is happening 
> before I start digging through libpq now.

What exactly does the exception say?


Jeroen



Re: libpqxx Large Objects

From
"Key88 SF"
Date:
That would be even better!

>From: "Jeroen T. Vermeulen" <jtv@xs4all.nl>
>To: Key88 SF <key88sf@hotmail.com>
>CC: pgsql-interfaces@postgresql.org
>Subject: Re: [INTERFACES] libpqxx Large Objects
>Date: Fri, 10 Jan 2003 13:13:37 +0100
>MIME-Version: 1.0
>Received: from mc3-f9.law16.hotmail.com ([65.54.236.144]) by 
>mc3-s3.law16.hotmail.com with Microsoft SMTPSVC(5.0.2195.5600); Fri, 10 Jan 
>2003 04:15:03 -0800
>Received: from relay2.pgsql.com ([64.49.215.143]) by 
>mc3-f9.law16.hotmail.com with Microsoft SMTPSVC(5.0.2195.5600); Fri, 10 Jan 
>2003 04:14:19 -0800
>Received: from postgresql.org (postgresql.org [64.49.215.8])by 
>relay2.pgsql.com (Postfix) with ESMTPid 8F6AEEE1CEF; Fri, 10 Jan 2003 
>07:14:13 -0500 (EST)
>Received: from localhost (postgresql.org [64.49.215.8])by postgresql.org 
>(Postfix) with ESMTP id 659E5475A1Efor <pgsql-interfaces@postgresql.org>; 
>Fri, 10 Jan 2003 07:14:08 -0500 (EST)
>Received: from mxzilla2.xs4all.nl (mxzilla2.xs4all.nl [194.109.6.50])by 
>postgresql.org (Postfix) with ESMTP id 9F4434758DCfor 
><pgsql-interfaces@postgresql.org>; Fri, 10 Jan 2003 07:14:07 -0500 (EST)
>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 h0ACDbvW073153;Fri, 10 Jan 
>2003 13:13:38 +0100 (CET)
>Received: (from jtv@localhost)by xs1.xs4all.nl (8.11.6/8.11.6) id 
>h0ACDbH07079;Fri, 10 Jan 2003 13:13:37 +0100 (CET)(envelope-from jtv)
>Message-ID: <20030110121337.GA4639@xs4all.nl>
>Mail-Followup-To: Key88 SF 
><key88sf@hotmail.com>,pgsql-interfaces@postgresql.org
>References: <F156tDEgz65i5dnZsuP00011977@hotmail.com>
>In-Reply-To: <F156tDEgz65i5dnZsuP00011977@hotmail.com>
>User-Agent: Mutt/1.4i
>X-Virus-Scanned: by AMaViS new-20020517
>Precedence: bulk
>Sender: pgsql-interfaces-owner@postgresql.org
>Return-Path: pgsql-interfaces-owner+M3558@postgresql.org
>X-OriginalArrivalTime: 10 Jan 2003 12:14:19.0874 (UTC) 
>FILETIME=[CD9E3C20:01C2B8A1]
>
>On Thu, Jan 09, 2003 at 11:09:58PM +0000, Key88 SF wrote:
> > In order to call the large object functions, one needs to be able to get
> > the PGconn connection object contained within a Connection object. Could 
>a
> > simple accessor method be added for the next revision?
>
>I'd rather add a special-purpose large object interface than provide
>a getter that breaks open the whole abstraction level.  What libpqxx
>does underneath its interface is not always simple, and it depends on
>provable properties that may not remain provable if the PGconn is
>exposed.  Besides, this kind of accessor would eventually come back
>to haunt me.
>
>
>Jeroen
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 4: Don't 'kill -9' the postmaster


_________________________________________________________________
The new MSN 8 is here: Try it free* for 2 months 
http://join.msn.com/?page=dept/dialup