Re: [INTERFACES] New user questions re libpq++ - Mailing list pgsql-interfaces

From Phil Romig
Subject Re: [INTERFACES] New user questions re libpq++
Date
Msg-id 199810192100.QAA07325@bierstadt.unl.edu
Whole thread Raw
In response to Re: [INTERFACES] New user questions re libpq++  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [INTERFACES] New user questions re libpq++
List pgsql-interfaces
>
> > a) The man page does not seem to match the code at all.  Is there a
> > newer man page (I noticed a request for documentation in the archives
> > but did not find a response).
>
> Wouldn't surprise me --- libpq++ doesn't seem to have anyone taking
> responsibility for it, so the documentation is probably suffering from
> software rot.  Reading the code is probably the best bet (although
> if you cared to update the docs as you read, that would be much
> appreciated...).  There isn't *that* much to libpq++, it's just a rather
> thin object-style wrapper for libpq.  So you should definitely read the
> libpq docs first to make sense of the code.

After digging into the header files I found the biggest problem with the
documentation is simply typographical.  It looks like sometime after the
docs were written they changed the capitalization scheme.  However they
also changed the class hierarchy and any change to the doc should probably
reflect that.  If I get comfortable enough with the code to fix the doc's
I would be happy to do it.

> > c) The header file c.h for libpq (which are included by libpq++) is
> > interacting with the version of the GNU standard stream library which I
> > have (gnu 2.8.x and egcs 1.0.2).
>
> As of the 6.4 beta releases, libpq has been cleaned up so that including
> libpq-fe.h doesn't import quite as much cruft; in particular c.h is not
> included anymore.  I think that that might fix your problem?  I haven't
> really tried to use libpq++ personally so can't be sure.  If you try it
> please report back.

I did install the 6.4 beta and it did fix the problem, thanks.  There is a
new problem with the c.h file, but I will get to that in a minute.

> (2) libpg++ ?  I'm afraid I'm not sure what that is.  Some outside
> interface to PGSQL maybe, or just a typo?  If it's some code I haven't
> heard about, I'd be interested to know more.

Typo, sorry.  For some reason I am incapable of typing a p then a q.


The installation of 6.4 beta went well.  However I have found one small
problem when using the new c.h header file and a ANSI standard C++ compiler
(not a big suprise, the official ANSI standard for C++ is only about 2 months
old). Briefly, the new standard does not require that C++ compiler define
__STDC__, but rather __STDCPP__.  Hence any code currently protected with
#ifdef __STDC__ needs to be looked at.

I did patch my version of c.h and would be happy to submit my change back
to the developers.  Should I

1) Post the change here.
2) Subscribe to the developers list and post it there.
3) Post it via the bug form from the postgres web page.
4) Other

Thanks for your help
Phil
promig@acm.org

pgsql-interfaces by date:

Previous
From: Gerald Gryschuk
Date:
Subject: Re: [INTERFACES] [Fwd: errors in psqlodbc]
Next
From: "Thomas G. Lockhart"
Date:
Subject: Re: [INTERFACES] [Fwd: errors in psqlodbc]