From Behzad@utilator.com Mon Dec 20 16:01:36 1999 Received: from adeptus.student.hig.se (Adeptus.Student.HIG.SE [130.243.12.10]) by hub.org (8.9.3/8.9.3) with ESMTP id LAA63260 for ; Mon, 20 Dec 1999 11:01:36 -0500 (EST) (envelope-from Behzad@utilator.com) Received: from pc-silvanum-2 (pc-silvanum-02 [130.243.3.202]) by adeptus.student.hig.se (8.8.8/8.8.8) with SMTP id RAA16633 for ; Mon, 20 Dec 1999 17:01:34 +0100 (MET) Message-Id: <3.0.6.32.19981219165928.00922490@pop.student.hig.se> X-Sender: na95bai@pop.student.hig.se X-Mailer: QUALCOMM Windows Eudora Light Version 3.0.6 (32) Date: Sat, 19 Dec 1998 16:59:28 +0100 To: pgsql-interfaces@postgresql.org From: Behzad Ardakani Subject: libpq Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by hub.org id LAA63319 hi I run redhat linux 5.2 and have problems when im trying too compile the first example in www.postgresql.org/docs/programmer/libpq-chapter4118.htm. i do "cc -o pqtest pqtest.c" and i get "/tmp/cca025511.o(.text+0x311): undefined reference to PQclear" the error message is for all the PQ function. please helpme:) Behzad Ardakani Utilator AB Box 857 801 31 Gävle phone: +46 (0)26 65 24 20 mobile: +46 (0)739 388 115 fax: +46 (0)26 61 41 20 e-mail: behzad@utilator.com website: http://www.utilator.com From shad@gi.com.au Fri Apr 23 06:19:46 1999 Received: from is2000.gi.com.au (is2000.gi.com.au [203.37.130.214]) by hub.org (8.9.3/8.9.1) with ESMTP id CAA22528 for ; Fri, 23 Apr 1999 02:19:46 -0400 (EDT) (envelope-from shad@gi.com.au) Received: from dps01 (dps01.intranet.com.au [192.168.1.241]) by is2000.gi.com.au (8.8.5/8.8.5) with SMTP id QAA02119 for ; Fri, 23 Apr 1999 16:19:09 +1000 Message-ID: <013001be8d52$8251dbb0$f101a8c0@dps01.is2000> Reply-To: "Shad Cool" From: "Shad Cool" To: Subject: libpq++ Date: Fri, 23 Apr 1999 16:28:31 +1000 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_012D_01BE8DA6.539788C0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 4.72.2106.4 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4 This is a multi-part message in MIME format. ------=_NextPart_000_012D_01BE8DA6.539788C0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi all, Im new to C++ and the docs on libpq++ do not contain any examples. If = any one had any source code (or examples) using this library and the = associated classes I would appreciate it if they could send it to me. Thanks. Shad Cool. Dynamic Programming Solutions. ------=_NextPart_000_012D_01BE8DA6.539788C0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi all,
 
Im new to C++ and the docs on libpq++ do not contain = any=20 examples.  If any one had any source code (or examples) using this = library=20 and the associated classes I would appreciate it if they could send it = to=20 me.
 
Thanks.
Shad Cool.
Dynamic Programming=20 Solutions.
------=_NextPart_000_012D_01BE8DA6.539788C0-- From kade@carolo.net Sat Apr 24 19:55:22 1999 Received: from mx.mx.skynet.be (mxrelay.skynet.be [195.238.1.11]) by hub.org (8.9.3/8.9.1) with ESMTP id PAA12026 for ; Sat, 24 Apr 1999 15:55:22 -0400 (EDT) (envelope-from kade@carolo.net) Received: from zorglub (dialup46.chimay.skynet.be [194.78.248.46]) by mx.mx.skynet.be (8.9.1/8.9.1) with SMTP id VAA19267; Sat, 24 Apr 1999 21:55:05 +0200 (MET DST) Message-ID: <009d01be8e84$5711bc80$120211ac@zorglub.CAROLO.NET> Reply-To: "KaDe" From: "KaDe" To: "Shad Cool" , Subject: Re: [INTERFACES] libpq++ Date: Sat, 24 Apr 1999 18:44:50 +0100 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0048_01BE8E82.88C33620" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 4.72.3110.5 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 This is a multi-part message in MIME format. ------=_NextPart_000_0048_01BE8E82.88C33620 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Im new to C++ and the docs on libpq++ do not contain any examples. = If any one had any source code (or examples) using this library and the = associated classes I would appreciate it if they could send it to me=20 If you have intalled the docs, in a directory = doc/src/interfaces/libpq++/examples (or something like that, I can't = have a look right now) you will find some simple sources. By the way, since my upgrade to 6.4 on a Debian installation, I've lost = the man page for libpq++. Is it a Debian-bug or something else ? --=20 Un LUG a Charleroi - BELGIUM http://carolo.net/carolinux On y utilisera Postgres ------=_NextPart_000_0048_01BE8E82.88C33620 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Im new to C++ and the docs on libpq++ do not = contain any=20 examples.  If any one had any source code (or examples) using = this=20 library and the associated classes I would appreciate it if they = could send=20 it to me
If you have intalled the docs, in a = directory=20 doc/src/interfaces/libpq++/examples (or something like that, I can't = have a look=20 right now) you will find some simple sources.
 
By the way, since my upgrade to 6.4 = on a Debian=20 installation, I've lost the man page for libpq++.
Is it a Debian-bug or something else = ?
 
--
Un LUG a Charleroi - BELGIUM
http://carolo.net/carolinux
On y utilisera Postgres
------=_NextPart_000_0048_01BE8E82.88C33620-- From olly@lfix.co.uk Sun Apr 25 13:14:43 1999 Received: from mail.enterprise.net (root@mail.enterprise.net [194.72.192.18]) by hub.org (8.9.3/8.9.1) with ESMTP id JAA86675 for ; Sun, 25 Apr 1999 09:14:43 -0400 (EDT) (envelope-from olly@lfix.co.uk) Received: from linda.lfix.co.uk (root@max06-014.enterprise.net [194.72.197.74]) by mail.enterprise.net (8.8.5/8.8.5) with ESMTP id OAA08240; Sun, 25 Apr 1999 14:14:39 +0100 (GMT/BST) Received: from linda.lfix.co.uk (olly@localhost [127.0.0.1]) by linda.lfix.co.uk (8.9.3/8.9.3/Debian/GNU) with ESMTP id OAA13571; Sun, 25 Apr 1999 14:14:39 +0100 Message-Id: <199904251314.OAA13571@linda.lfix.co.uk> X-Mailer: exmh version 2.0.2 2/24/98 (debian) To: "KaDe" cc: "Shad Cool" , pgsql-interfaces@postgreSQL.org Subject: Re: [INTERFACES] libpq++ In-Reply-To: Message from "KaDe" of "Sat, 24 Apr 1999 18:44:50 BST." <009d01be8e84$5711bc80$120211ac@zorglub.CAROLO.NET> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 25 Apr 1999 14:14:39 +0100 From: "Oliver Elphick" "KaDe" wrote: >By the way, since my upgrade to 6.4 on a Debian installation, I've lost = >the man page for libpq++. >Is it a Debian-bug or something else ? [I am Debian maintainer for PostgreSQL] In my copy of 6.4.2, from which I built the package, the directory src/interfaces/libpq++/man is missing. It seems to have been deleted from the source at the ftp site. -- Oliver Elphick Oliver.Elphick@lfix.co.uk Isle of Wight http://www.lfix.co.uk/oliver PGP key from public servers; key ID 32B8FAA1 ======================================== "Nay, in all these things we are more than conquerors through him that loved us." Romans 8:37 From jtv@cistron-office.nl Wed Mar 7 19:52:53 2001 Received: from smtp.cistron-office.nl (10fwd.cistron-office.nl [195.64.65.197]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f27Jqrx92182 for ; Wed, 7 Mar 2001 14:52:53 -0500 (EST) (envelope-from jtv@cistron-office.nl) Received: from slipstream.cistron-office.nl ([195.64.65.252]) by smtp.cistron-office.nl with smtp (Exim 3.22 #1 (Debian)) id 14ajzL-0007s2-00 for ; Wed, 07 Mar 2001 20:52:47 +0100 Received: by slipstream.cistron-office.nl (sSMTP sendmail emulation); Wed, 7 Mar 2001 20:52:47 +0100 From: "J. T. Vermeulen" Date: Wed, 7 Mar 2001 20:52:47 +0100 To: pgsql-interfaces@postgresql.org Subject: libpq++ Message-ID: <20010307205247.E3900@cistron.nl> Mail-Followup-To: pgsql-interfaces@postgresql.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.15i X-Disclaimer: Include standard disclaimer here. X-Archive-Number: 200103/67 X-Sequence-Number: 1228 Is anyone maintaining libpq++? My patches are beginning to seriously overlap each other, making it hard to submit them individually. If there's nobody out there, I'd be willing to maintain this code and make more extensive changes. In particular, I would like to: - introduce exceptions instead of manual checking, as suggested in TODO; - update the manual; - review all the little consts, bools, explicits and such; - replace PgTransaction by a more fine-grained and exception-safe mechanism outside the PgDatabase hierarchy; - provide STL-conformant interfaces for iterating over result sets; - allow fields to be accessed in a type-safe manner; - ensure clean compilation under g++ 3.0; - bring functionality up-to-date with libpq if, as & where needed Would that be OK? Jeroen From rjonasz@click2net.com Wed Mar 7 21:33:38 2001 Received: from enigma.jaded.net (enigma.jaded.net [216.94.132.9]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f27LXcx55260 for ; Wed, 7 Mar 2001 16:33:38 -0500 (EST) (envelope-from rjonasz@click2net.com) Received: from nietzsche.jaded.net (unknown [216.94.132.8]) by enigma.jaded.net (Postfix) with ESMTP id 2DF6D66B11; Wed, 7 Mar 2001 16:33:35 -0500 (EST) Date: Wed, 7 Mar 2001 16:35:46 -0500 (EST) From: Randy Jonasz X-Sender: To: "J. T. Vermeulen" Cc: Subject: Re: libpq++ In-Reply-To: <20010307205247.E3900@cistron.nl> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Archive-Number: 200103/68 X-Sequence-Number: 1229 Hi Jeroen, I'm very interested in a total revamp of the C++ API. I'd like to mirror the roguewave dbtools++ api in some ways as well as building a STL compliant interface. Would you be interested in working together on this? Cheers, Randy On Wed, 7 Mar 2001, J. T. Vermeulen wrote: > Is anyone maintaining libpq++? My patches are beginning to seriously > overlap each other, making it hard to submit them individually. > > If there's nobody out there, I'd be willing to maintain this code and > make more extensive changes. In particular, I would like to: > > - introduce exceptions instead of manual checking, as suggested in TODO; > - update the manual; > - review all the little consts, bools, explicits and such; > - replace PgTransaction by a more fine-grained and exception-safe > mechanism outside the PgDatabase hierarchy; > - provide STL-conformant interfaces for iterating over result sets; > - allow fields to be accessed in a type-safe manner; > - ensure clean compilation under g++ 3.0; > - bring functionality up-to-date with libpq if, as & where needed > > Would that be OK? > > > Jeroen > > > ---------------------------(end of broadcast)--------------------------- > TIP 6: Have you searched our list archives? > > http://www.postgresql.org/search.mpl > > Randy Jonasz Software Engineer Click2net Inc. Web: http://www.click2net.com Phone: (905) 271-3550 "You cannot possibly pay a philosopher what he's worth, but try your best" -- Aristotle From pgman@candle.pha.pa.us Wed Mar 7 21:43:45 2001 Received: from candle.pha.pa.us (candle.navpoint.com [162.33.245.46]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f27Lhjx88519 for ; Wed, 7 Mar 2001 16:43:45 -0500 (EST) (envelope-from pgman@candle.pha.pa.us) Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id QAA00583; Wed, 7 Mar 2001 16:43:30 -0500 (EST) From: Bruce Momjian Message-Id: <200103072143.QAA00583@candle.pha.pa.us> Subject: Re: libpq++ In-Reply-To: <20010307205247.E3900@cistron.nl> "from J. T. Vermeulen at Mar 7, 2001 08:52:47 pm" To: "J. T. Vermeulen" Date: Wed, 7 Mar 2001 16:43:29 -0500 (EST) CC: pgsql-interfaces@postgresql.org X-Mailer: ELM [version 2.4ME+ PL77 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Archive-Number: 200103/69 X-Sequence-Number: 1230 Sounds great. We are in 7.1 beta hold, so keep going and we can apply anything you have once we start on 7.2. > Is anyone maintaining libpq++? My patches are beginning to seriously > overlap each other, making it hard to submit them individually. > > If there's nobody out there, I'd be willing to maintain this code and > make more extensive changes. In particular, I would like to: > > - introduce exceptions instead of manual checking, as suggested in TODO; > - update the manual; > - review all the little consts, bools, explicits and such; > - replace PgTransaction by a more fine-grained and exception-safe > mechanism outside the PgDatabase hierarchy; > - provide STL-conformant interfaces for iterating over result sets; > - allow fields to be accessed in a type-safe manner; > - ensure clean compilation under g++ 3.0; > - bring functionality up-to-date with libpq if, as & where needed > > Would that be OK? > > > Jeroen > > > ---------------------------(end of broadcast)--------------------------- > TIP 6: Have you searched our list archives? > > http://www.postgresql.org/search.mpl > -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026 From pgman@candle.pha.pa.us Wed Mar 7 22:02:28 2001 Received: from candle.pha.pa.us (candle.navpoint.com [162.33.245.46]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f27M2Rx53733 for ; Wed, 7 Mar 2001 17:02:28 -0500 (EST) (envelope-from pgman@candle.pha.pa.us) Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id RAA02078; Wed, 7 Mar 2001 17:02:19 -0500 (EST) From: Bruce Momjian Message-Id: <200103072202.RAA02078@candle.pha.pa.us> Subject: Re: libpq++ In-Reply-To: <20010307205247.E3900@cistron.nl> "from J. T. Vermeulen at Mar 7, 2001 08:52:47 pm" To: "J. T. Vermeulen" Date: Wed, 7 Mar 2001 17:02:19 -0500 (EST) CC: pgsql-interfaces@postgresql.org X-Mailer: ELM [version 2.4ME+ PL77 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Archive-Number: 200103/70 X-Sequence-Number: 1231 > Is anyone maintaining libpq++? My patches are beginning to seriously > overlap each other, making it hard to submit them individually. > > If there's nobody out there, I'd be willing to maintain this code and > make more extensive changes. In particular, I would like to: > > - introduce exceptions instead of manual checking, as suggested in TODO; > - update the manual; > - review all the little consts, bools, explicits and such; > - replace PgTransaction by a more fine-grained and exception-safe > mechanism outside the PgDatabase hierarchy; > - provide STL-conformant interfaces for iterating over result sets; > - allow fields to be accessed in a type-safe manner; > - ensure clean compilation under g++ 3.0; > - bring functionality up-to-date with libpq if, as & where needed > > Would that be OK? Also, would you review this? ftp://candle.pha.pa.us/pub/postgresql/libpq++.mbox and merge any valuable changes into your copy of the code. Much of it is already in there. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026 From tgl@sss.pgh.pa.us Wed Mar 7 22:18:51 2001 Received: from sss.pgh.pa.us (sss.pgh.pa.us [209.114.132.154]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f27MIpx00395 for ; Wed, 7 Mar 2001 17:18:51 -0500 (EST) (envelope-from tgl@sss.pgh.pa.us) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.11.1/8.11.1) with ESMTP id f27MIf914249; Wed, 7 Mar 2001 17:18:41 -0500 (EST) To: "J. T. Vermeulen" cc: pgsql-interfaces@postgresql.org Subject: Re: libpq++ In-reply-to: <20010307205247.E3900@cistron.nl> References: <20010307205247.E3900@cistron.nl> Comments: In-reply-to "J. T. Vermeulen" message dated "Wed, 07 Mar 2001 20:52:47 +0100" Date: Wed, 07 Mar 2001 17:18:40 -0500 Message-ID: <14246.984003520@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200103/71 X-Sequence-Number: 1232 "J. T. Vermeulen" writes: > Is anyone maintaining libpq++? No one's been seen doing any major work on it in quite a while, AFAIR. > If there's nobody out there, I'd be willing to maintain this code and > make more extensive changes. In particular, I would like to: Go for it! regards, tom lane From jtv@cistron-office.nl Wed Mar 7 22:20:41 2001 Received: from smtp.cistron-office.nl (10fwd.cistron-office.nl [195.64.65.197]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f27MKfx09232 for ; Wed, 7 Mar 2001 17:20:41 -0500 (EST) (envelope-from jtv@cistron-office.nl) Received: from slipstream.cistron-office.nl ([195.64.65.252]) by smtp.cistron-office.nl with smtp (Exim 3.22 #1 (Debian)) id 14amIJ-0000po-00; Wed, 07 Mar 2001 23:20:31 +0100 Received: by slipstream.cistron-office.nl (sSMTP sendmail emulation); Wed, 7 Mar 2001 23:20:31 +0100 From: "J. T. Vermeulen" Date: Wed, 7 Mar 2001 23:20:31 +0100 To: Bruce Momjian Cc: "J. T. Vermeulen" , pgsql-interfaces@postgresql.org Subject: Re: libpq++ Message-ID: <20010307232031.H3900@cistron.nl> Mail-Followup-To: Bruce Momjian , "J. T. Vermeulen" , pgsql-interfaces@postgresql.org References: <20010307205247.E3900@cistron.nl> <200103072202.RAA02078@candle.pha.pa.us> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.15i In-Reply-To: <200103072202.RAA02078@candle.pha.pa.us>; from pgman@candle.pha.pa.us on Wed, Mar 07, 2001 at 05:02:19PM -0500 X-Disclaimer: Include standard disclaimer here. X-Archive-Number: 200103/72 X-Sequence-Number: 1233 On Wed, 07 Mar 2001, Bruce Momjian wrote: > > Would that be OK? > > Also, would you review this? > > ftp://candle.pha.pa.us/pub/postgresql/libpq++.mbox > > and merge any valuable changes into your copy of the code. Much of it > is already in there. Will do. Can I take it there have been no other changes between 7.0.3 and 7.2 as far as libpq++ is concerned, so I can continue to work with the version I have? Jeroen From pgman@candle.pha.pa.us Wed Mar 7 22:24:07 2001 Received: from candle.pha.pa.us (candle.navpoint.com [162.33.245.46]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f27MO7x26001 for ; Wed, 7 Mar 2001 17:24:07 -0500 (EST) (envelope-from pgman@candle.pha.pa.us) Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id RAA04626; Wed, 7 Mar 2001 17:23:51 -0500 (EST) From: Bruce Momjian Message-Id: <200103072223.RAA04626@candle.pha.pa.us> Subject: Re: libpq++ In-Reply-To: <20010307232031.H3900@cistron.nl> "from J. T. Vermeulen at Mar 7, 2001 11:20:31 pm" To: "J. T. Vermeulen" Date: Wed, 7 Mar 2001 17:23:51 -0500 (EST) CC: pgsql-interfaces@postgresql.org X-Mailer: ELM [version 2.4ME+ PL77 (25)] MIME-Version: 1.0 Content-Type: multipart/mixed; boundary=ELM984003831-4393-0_ Content-Transfer-Encoding: 7bit X-Archive-Number: 200103/73 X-Sequence-Number: 1234 --ELM984003831-4393-0_ Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII > On Wed, 07 Mar 2001, Bruce Momjian wrote: > > > > Would that be OK? > > > > Also, would you review this? > > > > ftp://candle.pha.pa.us/pub/postgresql/libpq++.mbox > > > > and merge any valuable changes into your copy of the code. Much of it > > is already in there. > > Will do. Can I take it there have been no other changes between 7.0.3 and 7.2 > as far as libpq++ is concerned, so I can continue to work with the version I > have? I don't think much has been done with 7.1 libpq++. I would download the snapshot and do a diff against 7.0.3 to be sure. Attached are the changes I see since 7.0.0. They are very minor. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026 --ELM984003831-4393-0_ Content-Transfer-Encoding: 7bit Content-Type: text/plain Content-Disposition: inline; filename="/bjm/diff" Index: libpq++.h =================================================================== RCS file: /home/projects/pgsql/cvsroot/pgsql/src/interfaces/libpq++/libpq++.h,v retrieving revision 1.9 retrieving revision 1.10 diff -c -r1.9 -r1.10 *** libpq++.h 2000/04/22 22:39:15 1.9 --- libpq++.h 2001/01/24 19:43:32 1.10 *************** *** 13,22 **** * in the build environment the individual include files are not * yet installed in a subdirectory. * ! * Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1994, Regents of the University of California * ! * $Id: libpq++.h,v 1.9 2000/04/22 22:39:15 tgl Exp $ * *------------------------------------------------------------------------- */ --- 13,22 ---- * in the build environment the individual include files are not * yet installed in a subdirectory. * ! * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * ! * $Id: libpq++.h,v 1.10 2001/01/24 19:43:32 momjian Exp $ * *------------------------------------------------------------------------- */ Index: pgconnection.cc =================================================================== RCS file: /home/projects/pgsql/cvsroot/pgsql/src/interfaces/libpq++/pgconnection.cc,v retrieving revision 1.9 retrieving revision 1.10 diff -c -r1.9 -r1.10 *** pgconnection.cc 2000/04/22 22:39:15 1.9 --- pgconnection.cc 2000/07/27 19:44:01 1.10 *************** *** 10,16 **** * Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION ! * $Header: /home/projects/pgsql/cvsroot/pgsql/src/interfaces/libpq++/pgconnection.cc,v 1.9 2000/04/22 22:39:15 tgl Exp $ * *------------------------------------------------------------------------- */ --- 10,16 ---- * Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION ! * $Header: /home/projects/pgsql/cvsroot/pgsql/src/interfaces/libpq++/pgconnection.cc,v 1.10 2000/07/27 19:44:01 momjian Exp $ * *------------------------------------------------------------------------- */ *************** *** 46,61 **** // Close the connection only if needed // This feature will most probably be used by the derived classes that // need not close the connection after they are destructed. ! if ( pgCloseConnection ) { if(pgResult) PQclear(pgResult); if(pgConn) PQfinish(pgConn); } } // PgConnection::connect // establish a connection to a backend ConnStatusType PgConnection::Connect(const char* conninfo) { // Connect to the database pgConn = PQconnectdb(conninfo); --- 46,77 ---- // Close the connection only if needed // This feature will most probably be used by the derived classes that // need not close the connection after they are destructed. ! CloseConnection(); ! } ! ! ! // PgConnection::CloseConnection() ! // close down the connection if there is one ! void PgConnection::CloseConnection() ! { ! // if the connection is open, close it first ! if ( pgCloseConnection ) { if(pgResult) PQclear(pgResult); + pgResult=NULL; if(pgConn) PQfinish(pgConn); + pgConn=NULL; + pgCloseConnection=0; } } + // PgConnection::connect // establish a connection to a backend ConnStatusType PgConnection::Connect(const char* conninfo) { + // if the connection is open, close it first + CloseConnection(); + // Connect to the database pgConn = PQconnectdb(conninfo); Index: pgconnection.h =================================================================== RCS file: /home/projects/pgsql/cvsroot/pgsql/src/interfaces/libpq++/pgconnection.h,v retrieving revision 1.7 retrieving revision 1.10 diff -c -r1.7 -r1.10 *** pgconnection.h 2000/04/22 22:39:15 1.7 --- pgconnection.h 2001/02/10 02:31:30 1.10 *************** *** 10,19 **** * NOTES * Currently under construction. * ! * Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1994, Regents of the University of California * ! * $Id: pgconnection.h,v 1.7 2000/04/22 22:39:15 tgl Exp $ * *------------------------------------------------------------------------- */ --- 10,19 ---- * NOTES * Currently under construction. * ! * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * ! * $Id: pgconnection.h,v 1.10 2001/02/10 02:31:30 tgl Exp $ * *------------------------------------------------------------------------- */ *************** *** 38,44 **** #endif extern "C" { ! #include "postgres.h" #include "libpq-fe.h" } --- 38,44 ---- #endif extern "C" { ! #include "postgres_fe.h" #include "libpq-fe.h" } *************** *** 81,86 **** --- 81,87 ---- protected: ConnStatusType Connect(const char* conninfo); + void CloseConnection(); string IntToString(int); // Default constructor is only available to subclasses PgConnection(); Index: pgcursordb.h =================================================================== RCS file: /home/projects/pgsql/cvsroot/pgsql/src/interfaces/libpq++/pgcursordb.h,v retrieving revision 1.5 retrieving revision 1.6 diff -c -r1.5 -r1.6 *** pgcursordb.h 2000/04/22 22:39:15 1.5 --- pgcursordb.h 2001/01/24 19:43:32 1.6 *************** *** 10,20 **** * NOTES * Currently under construction. * ! * Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1994, Regents of the University of California * * ! * $Id: pgcursordb.h,v 1.5 2000/04/22 22:39:15 tgl Exp $ * *------------------------------------------------------------------------- */ --- 10,20 ---- * NOTES * Currently under construction. * ! * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * * ! * $Id: pgcursordb.h,v 1.6 2001/01/24 19:43:32 momjian Exp $ * *------------------------------------------------------------------------- */ Index: pgdatabase.h =================================================================== RCS file: /home/projects/pgsql/cvsroot/pgsql/src/interfaces/libpq++/pgdatabase.h,v retrieving revision 1.8 retrieving revision 1.9 diff -c -r1.8 -r1.9 *** pgdatabase.h 2000/04/22 22:39:15 1.8 --- pgdatabase.h 2001/01/24 19:43:32 1.9 *************** *** 10,20 **** * NOTES * Currently under construction. * ! * Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1994, Regents of the University of California * * ! * $Id: pgdatabase.h,v 1.8 2000/04/22 22:39:15 tgl Exp $ * *------------------------------------------------------------------------- */ --- 10,20 ---- * NOTES * Currently under construction. * ! * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * * ! * $Id: pgdatabase.h,v 1.9 2001/01/24 19:43:32 momjian Exp $ * *------------------------------------------------------------------------- */ Index: pglobject.h =================================================================== RCS file: /home/projects/pgsql/cvsroot/pgsql/src/interfaces/libpq++/pglobject.h,v retrieving revision 1.5 retrieving revision 1.6 diff -c -r1.5 -r1.6 *** pglobject.h 2000/04/22 22:39:15 1.5 --- pglobject.h 2001/01/24 19:43:32 1.6 *************** *** 7,17 **** * declaration of the PGlobj class. * PGlobj encapsulates a large object interface to Postgres backend * ! * Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1994, Regents of the University of California * * ! * $Id: pglobject.h,v 1.5 2000/04/22 22:39:15 tgl Exp $ * *------------------------------------------------------------------------- */ --- 7,17 ---- * declaration of the PGlobj class. * PGlobj encapsulates a large object interface to Postgres backend * ! * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * * ! * $Id: pglobject.h,v 1.6 2001/01/24 19:43:32 momjian Exp $ * *------------------------------------------------------------------------- */ Index: pgtransdb.h =================================================================== RCS file: /home/projects/pgsql/cvsroot/pgsql/src/interfaces/libpq++/pgtransdb.h,v retrieving revision 1.5 retrieving revision 1.6 diff -c -r1.5 -r1.6 *** pgtransdb.h 2000/04/22 22:39:15 1.5 --- pgtransdb.h 2001/01/24 19:43:32 1.6 *************** *** 10,20 **** * NOTES * Currently under construction. * ! * Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1994, Regents of the University of California * * ! * $Id: pgtransdb.h,v 1.5 2000/04/22 22:39:15 tgl Exp $ * *------------------------------------------------------------------------- */ --- 10,20 ---- * NOTES * Currently under construction. * ! * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * * ! * $Id: pgtransdb.h,v 1.6 2001/01/24 19:43:32 momjian Exp $ * *------------------------------------------------------------------------- */ Index: examples/Makefile =================================================================== RCS file: /home/projects/pgsql/cvsroot/pgsql/src/interfaces/libpq++/examples/Makefile,v retrieving revision 1.10 retrieving revision 1.12 diff -c -r1.10 -r1.12 *** examples/Makefile 2000/03/02 02:00:59 1.10 --- examples/Makefile 2000/06/17 00:10:20 1.12 *************** *** 15,33 **** #CXXFLAGS= $(CFLAGS) -Wno-error -Wno-unused -Wl,-Bdynamic CXXFLAGS= $(CFLAGS) ! INCLUDE_OPT= -I$(HEADERDIR) - CXXFLAGS+= $(INCLUDE_OPT) - LDFLAGS+= -L$(LIBPQDIR) -lpq++ - - # - # And where libpq goes, so goes the authentication stuff... - # - ifdef KRBVERS - LDFLAGS+= $(KRBLIBS) - CXXFLAGS+= $(KRBFLAGS) - endif PROGS= testlibpq0 testlibpq1 testlibpq2 testlibpq3 \ testlibpq4 testlibpq5 testlibpq6 testlo --- 15,23 ---- #CXXFLAGS= $(CFLAGS) -Wno-error -Wno-unused -Wl,-Bdynamic CXXFLAGS= $(CFLAGS) ! CXXFLAGS+= -I$(HEADERDIR) LDFLAGS+= -L$(LIBPQDIR) -lpq++ PROGS= testlibpq0 testlibpq1 testlibpq2 testlibpq3 \ testlibpq4 testlibpq5 testlibpq6 testlo Index: examples/testlibpq0.cc =================================================================== RCS file: /home/projects/pgsql/cvsroot/pgsql/src/interfaces/libpq++/examples/testlibpq0.cc,v retrieving revision 1.5 retrieving revision 1.6 diff -c -r1.5 -r1.6 *** examples/testlibpq0.cc 1999/12/03 18:28:32 1.5 --- examples/testlibpq0.cc 2000/05/29 21:25:04 1.6 *************** *** 9,21 **** * * * IDENTIFICATION ! * $Header: /home/projects/pgsql/cvsroot/pgsql/src/interfaces/libpq++/examples/testlibpq0.cc,v 1.5 1999/12/03 18:28:32 momjian Exp $ * *------------------------------------------------------------------------- */ #include ! #include int main() { --- 9,21 ---- * * * IDENTIFICATION ! * $Header: /home/projects/pgsql/cvsroot/pgsql/src/interfaces/libpq++/examples/testlibpq0.cc,v 1.6 2000/05/29 21:25:04 momjian Exp $ * *------------------------------------------------------------------------- */ #include ! #include "libpq++.h" int main() { Index: examples/testlibpq1.cc =================================================================== RCS file: /home/projects/pgsql/cvsroot/pgsql/src/interfaces/libpq++/examples/testlibpq1.cc,v retrieving revision 1.7 retrieving revision 1.8 diff -c -r1.7 -r1.8 *** examples/testlibpq1.cc 2000/04/25 21:00:29 1.7 --- examples/testlibpq1.cc 2000/05/29 21:25:04 1.8 *************** *** 8,14 **** #include #include ! #include int main() { --- 8,14 ---- #include #include ! #include "libpq++.h" int main() { Index: examples/testlibpq2.cc =================================================================== RCS file: /home/projects/pgsql/cvsroot/pgsql/src/interfaces/libpq++/examples/testlibpq2.cc,v retrieving revision 1.8 retrieving revision 1.9 diff -c -r1.8 -r1.9 *** examples/testlibpq2.cc 2000/04/25 21:00:29 1.8 --- examples/testlibpq2.cc 2000/05/29 21:25:04 1.9 *************** *** 8,14 **** #include #include ! #include int main() { --- 8,14 ---- #include #include ! #include "libpq++.h" int main() { Index: examples/testlibpq3.cc =================================================================== RCS file: /home/projects/pgsql/cvsroot/pgsql/src/interfaces/libpq++/examples/testlibpq3.cc,v retrieving revision 1.8 retrieving revision 1.9 diff -c -r1.8 -r1.9 *** examples/testlibpq3.cc 2000/04/25 21:00:29 1.8 --- examples/testlibpq3.cc 2000/05/29 21:25:04 1.9 *************** *** 9,15 **** #include #include ! #include int main() { --- 9,15 ---- #include #include ! #include "libpq++.h" int main() { Index: examples/testlibpq4.cc =================================================================== RCS file: /home/projects/pgsql/cvsroot/pgsql/src/interfaces/libpq++/examples/testlibpq4.cc,v retrieving revision 1.6 retrieving revision 1.7 diff -c -r1.6 -r1.7 *** examples/testlibpq4.cc 2000/04/25 21:00:29 1.6 --- examples/testlibpq4.cc 2000/05/29 21:25:04 1.7 *************** *** 19,25 **** * */ #include ! #include #include main() --- 19,25 ---- * */ #include ! #include "libpq++.h" #include main() Index: examples/testlibpq5.cc =================================================================== RCS file: /home/projects/pgsql/cvsroot/pgsql/src/interfaces/libpq++/examples/testlibpq5.cc,v retrieving revision 1.6 retrieving revision 1.7 diff -c -r1.6 -r1.7 *** examples/testlibpq5.cc 2000/04/25 21:00:29 1.6 --- examples/testlibpq5.cc 2000/05/29 21:25:04 1.7 *************** *** 27,33 **** * */ #include ! #include #include extern "C" { #include "postgres.h" // for Postgres types --- 27,33 ---- * */ #include ! #include "libpq++.h" #include extern "C" { #include "postgres.h" // for Postgres types Index: examples/testlibpq6.cc =================================================================== RCS file: /home/projects/pgsql/cvsroot/pgsql/src/interfaces/libpq++/examples/testlibpq6.cc,v retrieving revision 1.5 retrieving revision 1.6 diff -c -r1.5 -r1.6 *** examples/testlibpq6.cc 2000/04/25 21:00:29 1.5 --- examples/testlibpq6.cc 2000/05/29 21:25:04 1.6 *************** *** 5,11 **** * */ #include ! #include #include main() --- 5,11 ---- * */ #include ! #include "libpq++.h" #include main() Index: examples/testlo.cc =================================================================== RCS file: /home/projects/pgsql/cvsroot/pgsql/src/interfaces/libpq++/examples/testlo.cc,v retrieving revision 1.7 retrieving revision 1.8 diff -c -r1.7 -r1.8 *** examples/testlo.cc 2000/04/25 21:00:29 1.7 --- examples/testlo.cc 2000/05/29 21:25:04 1.8 *************** *** 7,18 **** * * * IDENTIFICATION ! * $Header: /home/projects/pgsql/cvsroot/pgsql/src/interfaces/libpq++/examples/testlo.cc,v 1.7 2000/04/25 21:00:29 momjian Exp $ * *------------------------------------------------------------------------- */ #include ! #include #include int main(int argc, char **argv) --- 7,18 ---- * * * IDENTIFICATION ! * $Header: /home/projects/pgsql/cvsroot/pgsql/src/interfaces/libpq++/examples/testlo.cc,v 1.8 2000/05/29 21:25:04 momjian Exp $ * *------------------------------------------------------------------------- */ #include ! #include "libpq++.h" #include int main(int argc, char **argv) --ELM984003831-4393-0_-- From tgl@sss.pgh.pa.us Wed Mar 7 22:44:38 2001 Received: from sss.pgh.pa.us (sss.pgh.pa.us [209.114.132.154]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f27Micx92392 for ; Wed, 7 Mar 2001 17:44:38 -0500 (EST) (envelope-from tgl@sss.pgh.pa.us) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.11.1/8.11.1) with ESMTP id f27MiW914374; Wed, 7 Mar 2001 17:44:33 -0500 (EST) To: "J. T. Vermeulen" cc: Bruce Momjian , pgsql-interfaces@postgresql.org Subject: Re: libpq++ In-reply-to: <20010307232031.H3900@cistron.nl> References: <20010307205247.E3900@cistron.nl> <200103072202.RAA02078@candle.pha.pa.us> <20010307232031.H3900@cistron.nl> Comments: In-reply-to "J. T. Vermeulen" message dated "Wed, 07 Mar 2001 23:20:31 +0100" Date: Wed, 07 Mar 2001 17:44:32 -0500 Message-ID: <14371.984005072@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200103/74 X-Sequence-Number: 1235 "J. T. Vermeulen" writes: > Will do. Can I take it there have been no other changes between 7.0.3 > and 7.2 as far as libpq++ is concerned, so I can continue to work with > the version I have? No, you shouldn't take it. For one thing, Peter E. has been reorganizing the configure/build process, and that has impacted pretty nearly everything. The changes aren't likely to be extensive, but you'd still be facing a merge task when you are ready to submit diffs. Seems like you might as well try to avoid that by starting from something more current than 7.0.3. 7.1beta5 would probably be a reasonable starting point. regards, tom lane From jtv@cistron-office.nl Wed Mar 7 23:02:58 2001 Received: from smtp.cistron-office.nl (10fwd.cistron-office.nl [195.64.65.197]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f27N2vx67071 for ; Wed, 7 Mar 2001 18:02:58 -0500 (EST) (envelope-from jtv@cistron-office.nl) Received: from slipstream.cistron-office.nl ([195.64.65.252]) by smtp.cistron-office.nl with smtp (Exim 3.22 #1 (Debian)) id 14amxG-0001HS-00; Thu, 08 Mar 2001 00:02:50 +0100 Received: by slipstream.cistron-office.nl (sSMTP sendmail emulation); Thu, 8 Mar 2001 00:02:50 +0100 From: "J. T. Vermeulen" Date: Thu, 8 Mar 2001 00:02:50 +0100 To: Randy Jonasz Cc: "J. T. Vermeulen" , pgsql-interfaces@postgresql.org Subject: Re: libpq++ Message-ID: <20010308000250.I3900@cistron.nl> Mail-Followup-To: Randy Jonasz , "J. T. Vermeulen" , pgsql-interfaces@postgresql.org References: <20010307205247.E3900@cistron.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.15i In-Reply-To: ; from rjonasz@click2net.com on Wed, Mar 07, 2001 at 04:35:46PM -0500 X-Disclaimer: Include standard disclaimer here. X-Archive-Number: 200103/75 X-Sequence-Number: 1236 On Wed, 07 Mar 2001, Randy Jonasz wrote: > I'm very interested in a total revamp of the C++ API. I'd like to mirror > the roguewave dbtools++ api in some ways as well as building a STL > compliant interface. Would you be interested in working together on this? Very. I'm sure they must've done a good job, seeing they have Todd Veldhuys (the first to publish C++ expression templates) on board. But provided, of course, that libpq++ can remain a reasonably light wrapper around the C interface--or at least spend most of its code adapting the C API to the way C++ wants things to be done. First however I'll have to merge the changes from at least the three groups of diffs that I have already. But for when the time comes, I'd be delighted if you could point me to a brief introduction somewhere that tells me at a quick glance what the general ideas behind the RogueWave API is. Oh, did I mention I was interested in something short and nutshell-contained? ;-) Jeroen From jtv@cistron-office.nl Wed Mar 7 23:13:41 2001 Received: from smtp.cistron-office.nl (10fwd.cistron-office.nl [195.64.65.197]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f27NDfx00236 for ; Wed, 7 Mar 2001 18:13:41 -0500 (EST) (envelope-from jtv@cistron-office.nl) Received: from slipstream.cistron-office.nl ([195.64.65.252]) by smtp.cistron-office.nl with smtp (Exim 3.22 #1 (Debian)) id 14an7b-0001Lj-00; Thu, 08 Mar 2001 00:13:31 +0100 Received: by slipstream.cistron-office.nl (sSMTP sendmail emulation); Thu, 8 Mar 2001 00:13:31 +0100 From: "J. T. Vermeulen" Date: Thu, 8 Mar 2001 00:13:31 +0100 To: Tom Lane Cc: "J. T. Vermeulen" , Bruce Momjian , pgsql-interfaces@postgresql.org Subject: Re: libpq++ Message-ID: <20010308001331.J3900@cistron.nl> Mail-Followup-To: Tom Lane , "J. T. Vermeulen" , Bruce Momjian , pgsql-interfaces@postgresql.org References: <20010307205247.E3900@cistron.nl> <200103072202.RAA02078@candle.pha.pa.us> <20010307232031.H3900@cistron.nl> <14371.984005072@sss.pgh.pa.us> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.15i In-Reply-To: <14371.984005072@sss.pgh.pa.us>; from tgl@sss.pgh.pa.us on Wed, Mar 07, 2001 at 05:44:32PM -0500 X-Disclaimer: Include standard disclaimer here. X-Archive-Number: 200103/76 X-Sequence-Number: 1237 On Wed, 07 Mar 2001, Tom Lane wrote: > No, you shouldn't take it. For one thing, Peter E. has been > reorganizing the configure/build process, and that has impacted pretty > nearly everything. The changes aren't likely to be extensive, but you'd > still be facing a merge task when you are ready to submit diffs. Seems > like you might as well try to avoid that by starting from something more > current than 7.0.3. > > 7.1beta5 would probably be a reasonable starting point. Whew--thanks! Indeed, I'm just reading through the CVS overview and I see it now. Downloadink 7.1b5 & lookink forward to more merging... Jeroen From rjonasz@click2net.com Thu Mar 8 21:29:10 2001 Received: from enigma.jaded.net (enigma.jaded.net [216.94.132.9]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f28LTAx90182 for ; Thu, 8 Mar 2001 16:29:10 -0500 (EST) (envelope-from rjonasz@click2net.com) Received: from nietzsche.jaded.net (unknown [216.94.132.8]) by enigma.jaded.net (Postfix) with ESMTP id 2954966B0E; Thu, 8 Mar 2001 16:29:08 -0500 (EST) Date: Thu, 8 Mar 2001 16:31:19 -0500 (EST) From: Randy Jonasz X-Sender: To: "J.T.Vermeulen" Cc: Subject: Re: libpq++ In-Reply-To: <20010308000250.I3900@cistron.nl> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Archive-Number: 200103/84 X-Sequence-Number: 1245 That's great! I think the current C++ API could be improved by a bottom up rewrite. This would facilitate a true OOP design and permit code such as: pgdatabase db( "coninfo" ); pgresult res = db.query( "sql"); psgresult::iterator row = res.begin(); pgresult::iterator end = res.end(); while( start < end ) { *row >> var1 >> var2; //or var1 = row["colname"]; //or var1 = row[col]; } I'd like to see the result container comply with STL standard so results can be used with the STL algorithms or copied into other containers. I've talked about this in the past, and agree that lazy conversion of values into their appropriate types would be of use as well. what do you think? Cheers, Randy On Thu, 8 Mar 2001, J.T.Vermeulen wrote: > On Wed, 07 Mar 2001, Randy Jonasz wrote: > > > I'm very interested in a total revamp of the C++ API. I'd like to mirror > > the roguewave dbtools++ api in some ways as well as building a STL > > compliant interface. Would you be interested in working together on this? > > Very. I'm sure they must've done a good job, seeing they have Todd Veldhuys > (the first to publish C++ expression templates) on board. But provided, of > course, that libpq++ can remain a reasonably light wrapper around the C > interface--or at least spend most of its code adapting the C API to the way > C++ wants things to be done. > > First however I'll have to merge the changes from at least the three groups > of diffs that I have already. But for when the time comes, I'd be delighted > if you could point me to a brief introduction somewhere that tells me at a > quick glance what the general ideas behind the RogueWave API is. Oh, did I > mention I was interested in something short and nutshell-contained? ;-) > > > Jeroen > > > Randy Jonasz Software Engineer Click2net Inc. Web: http://www.click2net.com Phone: (905) 271-3550 "You cannot possibly pay a philosopher what he's worth, but try your best" -- Aristotle From jtv@cistron.nl Sun Mar 11 19:20:13 2001 Received: from smtp.cistron-office.nl (10fwd.cistron-office.nl [195.64.65.197]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f2BJKDx02523 for ; Sun, 11 Mar 2001 14:20:13 -0500 (EST) (envelope-from jtv@cistron-office.nl) Received: from subspace.cistron-office.nl ([195.64.65.200]) by smtp.cistron-office.nl with esmtp (Exim 3.22 #1 (Debian)) id 14cBNz-0002cr-00; Sun, 11 Mar 2001 20:20:11 +0100 Received: (from jtv@localhost) by subspace.cistron-office.nl (8.9.3/8.9.3/Debian 8.9.3-6) id UAA29935; Sun, 11 Mar 2001 20:20:11 +0100 Date: Sun, 11 Mar 2001 20:20:10 +0100 From: "J. T. Vermeulen" To: Randy Jonasz Cc: "J.T.Vermeulen" , pgsql-interfaces@postgresql.org Subject: Re: libpq++ Message-ID: <20010311202010.B29078@cistron.nl> Mail-Followup-To: Randy Jonasz , "J.T.Vermeulen" , pgsql-interfaces@postgresql.org References: <20010308000250.I3900@cistron.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from rjonasz@click2net.com on Thu, Mar 08, 2001 at 04:31:19PM -0500 X-Disclaimer: Include standard disclaimer here. X-Archive-Number: 200103/90 X-Sequence-Number: 1251 On Thu, 08 Mar 2001, Randy Jonasz wrote: > psgresult::iterator row = res.begin(); > pgresult::iterator end = res.end(); > > while( start < end ) { > > *row >> var1 >> var2; > //or > var1 = row["colname"]; > //or > var1 = row[col]; > > } Right! For now I wouldn't so far as to make the result sets modifiable though. That would be opening a whole new can of worms. Also, there is the issue of type safety to be dealt with. I think that has priority over operator << on result sets. So initially at least, const_iterators only. But definitely yes on the sequence algorithms, and perhaps we could find a meaningful way to work in associative behaviour as well. One side effect of having a type-safe interface would be that the COPY command no longer requires complete compile-time knowledge of a table's definition. If COPY is faster than INSERT for mass inserts (I have no idea whether it is, but it might just skip a bit of parsing on the server side and send less data over the wire), that would allow for faster data insertion while keeping the program reasonably robust w.r.t. schema changes. Another thing that could be done is to also have a more restricted interface where you don't send SQL at all, and all operations are encoded in the class interface. That might make it possible to have more-or-less generic failover built into the frontend (automatically restore active triggers when connection to server is recovered, stuff like that). Jeroen From pgman@candle.pha.pa.us Sun Apr 29 20:04:54 2001 Received: from candle.pha.pa.us (candle.navpoint.com [162.33.245.46]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f3TK4s315928 for ; Sun, 29 Apr 2001 16:04:54 -0400 (EDT) (envelope-from pgman@candle.pha.pa.us) Received: (from pgman@localhost) by candle.pha.pa.us (8.10.1/8.10.1) id f3TK4nf21949; Sun, 29 Apr 2001 16:04:49 -0400 (EDT) From: Bruce Momjian Message-Id: <200104292004.f3TK4nf21949@candle.pha.pa.us> Subject: Re: libpq++ In-Reply-To: <15084.18414.123450.642118@idoru.tricord.com> "from Justin Banks at Apr 29, 2001 11:57:18 am" To: justinb@tricord.com Date: Sun, 29 Apr 2001 16:04:49 -0400 (EDT) CC: PostgreSQL-interfaces X-Mailer: ELM [version 2.4ME+ PL90 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Archive-Number: 200104/132 X-Sequence-Number: 1516 I am not so much the libpq++ maintainer as the one who applies people's patches. There is an interfaces list that would love to hear about your work. I am CC'ing them on this. We certainly need libpq++ improvements. If you would prefer not to deal with the interfaces list, send something to me and I will send it over there. > Bruce - > Are you the current maintainer of libpq++? I've got some stuff that > would make it a much more inheritable class (at least from my perspective), > and wouldn't break anything. If you're interested, let me know, and I'll > outline it for you. > > -justinb > > -- > Justin Banks Tricord, Inc. justinb@tricord.com > Education... has produced a vast population able to read but unable to > distinguish what is worth reading. -G. M. Trevelyan > -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026 From justinb@mr-boo.com Thu May 3 16:44:45 2001 Received: from postgresql.org.org (webmail.postgresql.org [216.126.85.28]) by postgresql.org (8.11.3/8.11.1) with SMTP id f43GijA07318 for ; Thu, 3 May 2001 12:44:45 -0400 (EDT) (envelope-from pgsql-interfaces-owner@postgresql.org) Received: from schnauzer.mr-boo.com (msp-65-29-31-135.mn.rr.com [65.29.31.135]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f3U2o8317042 for ; Sun, 29 Apr 2001 22:50:09 -0400 (EDT) (envelope-from justinb@mr-boo.com) Received: from dervish.mr-boo.com.mr-boo.com (dervish [30.128.1.3]) by schnauzer.mr-boo.com (SGI-8.9.3/8.9.3) with SMTP id WAA58006; Sun, 29 Apr 2001 22:01:13 -0500 (CDT) From: Justin Banks MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Sun, 29 Apr 2001 22:07:10 -0500 (CDT) X-no-archive: yes Reply-To: justinb@mr-boo.com X-Supreme-Numerical-Value: Bleen To: Bruce Momjian Cc: justinb@tricord.com, PostgreSQL-interfaces Subject: Re: libpq++ In-Reply-To: <200104292004.f3TK4nf21949@candle.pha.pa.us> References: <15084.18414.123450.642118@idoru.tricord.com> <200104292004.f3TK4nf21949@candle.pha.pa.us> X-Mailer: VM 6.43 under 20.4 "Emerald" XEmacs Lucid Message-ID: <15084.54539.44529.709222@dervish.mr-boo.com> X-Archive-Number: 200105/10 X-Sequence-Number: 1534 >>>>> "Bruce" == Bruce Momjian writes: Bruce> I am not so much the libpq++ maintainer as the one who applies Bruce> people's patches. There is an interfaces list that would love to Bruce> hear about your work. I am CC'ing them on this. We certainly need Bruce> libpq++ improvements. If you would prefer not to deal with the Bruce> interfaces list, send something to me and I will send it over there. Here's what I've done. The following code will create a number of different connections to the B.E., even though there's no reason to have more than one. This prevents one from inheriting PgDatabase, and then creating an array of 100 or so of those objects. #include #include #include class base : public PgDatabase { public: base() { cout << "base class instantiating" << endl; Connect("host=db dbname=golem user=golemadmin password=bleen"); } virtual ~base() { cout << "Base class destructing" << endl; } }; class derived : public base { public: derived() { cout << "derived class instantiating" << endl; } ~derived() { cout << "derived class destructing" << endl; } }; int main(int argc, char* argv[]) { int cnt, tuples; derived* classes, *ptr; derived single; if(argc > 1) cnt = atoi(argv[1]); else cnt = 5; cout << "getting array of " << cnt << " objects" << endl; classes = new derived[cnt]; cout << "array allocated, sleeping for validation" << endl; sleep(5); for(int i = 0; i < cnt; i++) { cout << "testing object " << i << endl; ptr = &(classes[i]); ptr->Exec("select * from defaults"); tuples = ptr->Tuples(); cout << "got " << tuples << " tuples" << endl; for(int j = 0; j < tuples; j++) { cout << "4th field is " << ptr->GetValue(j, 4) << endl; } } delete[] classes; cout << "aggregates deleted" << endl; single.Exec("select table_name from tables limit 1"); cout << "exec of single finished" << endl; cout << "value is " << single.GetValue(0, 0) << endl; exit(0); } What I'd like to have happen is for a total of one connection to the database to be made, and have all these objects share that connection transparently. I made this happen by using a shared memory segment to store the connection pointer. Here's the diff. It doesn't seem to break anything, but then again, my coverage is rather limited at this point. Diff follows : --- pgconnection.cc.orig Sun Apr 29 16:09:02 2001 +++ pgconnection.cc Sun Apr 29 21:35:36 2001 @@ -17,7 +17,6 @@ #include "pgconnection.h" - // **************************************************************** // // PgConnection Implementation @@ -54,7 +53,15 @@ // close down the connection if there is one void PgConnection::CloseConnection() { - // if the connection is open, close it first +#if USING_SYSV_IPC == 1 + struct shmid_ds shminfo; + + shmctl(shmid, IPC_STAT, &shminfo); + // + // if we're the only one left ... + // + if(shminfo.shm_nattch == 1) { +#endif if ( pgCloseConnection ) { if(pgResult) PQclear(pgResult); pgResult=NULL; @@ -62,6 +69,10 @@ pgConn=NULL; pgCloseConnection=0; } +#if USING_SYSV_IPC == 1 + } + shmdt(addr); +#endif } @@ -69,11 +80,60 @@ // establish a connection to a backend ConnStatusType PgConnection::Connect(const char* conninfo) { +#if USING_SYSV_IPC == 1 + int key = (int)getpid(); + struct shmid_ds shminfo; +#endif + // if the connection is open, close it first CloseConnection(); // Connect to the database +#if USING_SYSV_IPC == 1 + if((shmid = shmget(key, sizeof(addr), IPC_CREAT|SHM_W|SHM_R)) >= 0) { + if((addr = (int*)shmat(shmid, 0, 0)) > 0) { + // + // now, we have our segment. If we're the first attacher, then we need + // to do the connect. If we're not the first attacher, then the + // connection is already made, we just need to check and make sure + // it's okay, connecting again if we have to. + // + if(shmctl(shmid, IPC_STAT, &shminfo) == 0) { + if(shminfo.shm_nattch == 1) { + pgConn = PQconnectdb(conninfo); + *addr = (int)pgConn; + } + else { + pgConn = (PGconn*)*addr; + if(Status() == CONNECTION_BAD) { + pgConn = PQconnectdb(conninfo); + *addr = (int)pgConn; + } + } + } + else { + // + // fallback to safe connection + // + pgConn = PQconnectdb(conninfo); + } + } + else { + // + // fallback to safe connection + // + pgConn = PQconnectdb(conninfo); + } + } + else { + // + // fallback to safe connection + // + pgConn = PQconnectdb(conninfo); + } +#else pgConn = PQconnectdb(conninfo); +#endif // Now we have a connection we must close (even if it's bad!) pgCloseConnection = 1; --- pgconnection.h.orig Sun Apr 29 16:09:54 2001 +++ pgconnection.h Sun Apr 29 17:07:57 2001 @@ -46,6 +46,15 @@ using namespace std; #endif +#if HAVE_SYS_SHM_H == 1 && HAVE_SYS_IPC_H == 1 + #include + #include + #include + #include + #define USING_SYSV_IPC 1 +#else + #define USING_SYSV_IPC 0 +#endif // **************************************************************** // @@ -91,6 +100,9 @@ // so make copy constructor and assignment op private. PgConnection(const PgConnection&); PgConnection& operator= (const PgConnection&); +#if USING_SYSV_IPC == 1 + int shmid, *addr; +#endif }; #endif // PGCONNECTION_H I think that's it. I've got more at work, so I may have missed something, but I don't think so. -justinb -- Justin Banks @ home Distrust any enterprise that requires new clothes. -Thoreau From justinb@mr-boo.com Thu May 3 16:45:58 2001 Received: from postgresql.org.org (webmail.postgresql.org [216.126.85.28]) by postgresql.org (8.11.3/8.11.1) with SMTP id f43GjwA07887 for ; Thu, 3 May 2001 12:45:58 -0400 (EDT) (envelope-from pgsql-interfaces-owner@postgresql.org) Received: from schnauzer.mr-boo.com (msp-65-29-31-135.mn.rr.com [65.29.31.135]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f3UCoiq17611 for ; Mon, 30 Apr 2001 08:50:44 -0400 (EDT) (envelope-from justinb@mr-boo.com) Received: from dervish.mr-boo.com.mr-boo.com (dervish [30.128.1.3]) by schnauzer.mr-boo.com (SGI-8.9.3/8.9.3) with SMTP id HAA58399; Mon, 30 Apr 2001 07:47:05 -0500 (CDT) From: Justin Banks MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Mon, 30 Apr 2001 07:53:02 -0500 (CDT) X-no-archive: yes Reply-To: justinb@mr-boo.com X-Supreme-Numerical-Value: Bleen To: Bruce Momjian Cc: justinb@tricord.com, PostgreSQL-interfaces Subject: Re: libpq++ In-Reply-To: <200104292004.f3TK4nf21949@candle.pha.pa.us> References: <15084.18414.123450.642118@idoru.tricord.com> <200104292004.f3TK4nf21949@candle.pha.pa.us> X-Mailer: VM 6.43 under 20.4 "Emerald" XEmacs Lucid Message-ID: <15085.24280.868910.556829@dervish.mr-boo.com> X-Archive-Number: 200105/11 X-Sequence-Number: 1535 >>>>> "Bruce" == Bruce Momjian writes: Bruce> I am not so much the libpq++ maintainer as the one who applies Bruce> people's patches. There is an interfaces list that would love to Bruce> hear about your work. I am CC'ing them on this. We certainly need Bruce> libpq++ improvements. If you would prefer not to deal with the Bruce> interfaces list, send something to me and I will send it over there. As one would have expected, I've found a problem. The c++ std. says that Automatic objects are not destroyed as a result of calling exit(), and so, a automatic PgDatabase in main() (or most anywhere, actually), would not have it's destructor called during an exit(), thereby leaving junk shm. segments around. I'm not sure that an atexit can be called on a member function with no argument, so I'll do some experimenting with macros and temporary block insertion. Better ideas welcome ;) -justinb -- Justin Banks @ home 'We have no intention of shipping another bloated operating system and forcing that down the throats of our Windows customers' -- Paul Maritz, Microsoft Group Vice President From jtv@cistron-office.nl Thu May 3 13:47:48 2001 Received: from smtp.cistron-office.nl (10fwd.cistron-office.nl [195.64.65.197]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f43DlmA51713 for ; Thu, 3 May 2001 09:47:48 -0400 (EDT) (envelope-from jtv@cistron-office.nl) Received: from slipstream.cistron-office.nl ([195.64.65.252]) by smtp.cistron-office.nl with smtp (Exim 3.22 #1 (Debian)) id 14vJS5-0008ST-00; Thu, 03 May 2001 15:47:29 +0200 Received: by slipstream.cistron-office.nl (sSMTP sendmail emulation); Thu, 3 May 2001 15:47:29 +0200 From: "J. T. Vermeulen" Date: Thu, 3 May 2001 15:47:28 +0200 To: Bruce Momjian Cc: justinb@tricord.com, PostgreSQL-interfaces Subject: Re: Re: libpq++ Message-ID: <20010503154728.A2214@cistron.nl> Mail-Followup-To: Bruce Momjian , justinb@tricord.com, PostgreSQL-interfaces References: <15084.18414.123450.642118@idoru.tricord.com> <200104292004.f3TK4nf21949@candle.pha.pa.us> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.17i In-Reply-To: <200104292004.f3TK4nf21949@candle.pha.pa.us>; from pgman@candle.pha.pa.us on Sun, Apr 29, 2001 at 04:04:49PM -0400 X-Disclaimer: Include standard disclaimer here. X-Archive-Number: 200105/9 X-Sequence-Number: 1533 On Sun, 29 Apr 2001, Bruce Momjian wrote: > I am not so much the libpq++ maintainer as the one who applies people's > patches. There is an interfaces list that would love to hear about your > work. I am CC'ing them on this. We certainly need libpq++ > improvements. If you would prefer not to deal with the interfaces list, > send something to me and I will send it over there. Working on rewrite--can do some serious work once my new laptop arrives. Jeroen From justinb@tricord.com Thu May 3 16:45:15 2001 Received: from postgresql.org.org (webmail.postgresql.org [216.126.85.28]) by postgresql.org (8.11.3/8.11.1) with SMTP id f43GjFA07673 for ; Thu, 3 May 2001 12:45:15 -0400 (EDT) (envelope-from pgsql-interfaces-owner@postgresql.org) Received: from idoru.tricord.com ([64.240.27.94]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f43EfvA69576 for ; Thu, 3 May 2001 10:41:57 -0400 (EDT) (envelope-from justinb@tricord.com) Received: (from justinb@localhost) by idoru.tricord.com (8.9.3/8.9.3) id JAA27294; Thu, 3 May 2001 09:41:30 -0500 From: Justin Banks MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15089.28186.951568.832153@idoru.tricord.com> Date: Thu, 3 May 2001 09:41:30 -0500 (CDT) X-no-archive: yes Reply-To: justinb@tricord.com X-Supreme-Numerical-Value: Bleen To: "J. T. Vermeulen" Cc: Bruce Momjian , justinb@tricord.com, PostgreSQL-interfaces Subject: Re: Re: libpq++ In-Reply-To: <20010503154728.A2214@cistron.nl> References: <15084.18414.123450.642118@idoru.tricord.com> <200104292004.f3TK4nf21949@candle.pha.pa.us> <20010503154728.A2214@cistron.nl> X-Mailer: VM 6.75 under 21.1 (patch 14) "Cuyahoga Valley" XEmacs Lucid X-Archive-Number: 200105/11 X-Sequence-Number: 1537 >>>>> "J" == J T Vermeulen writes: J> On Sun, 29 Apr 2001, Bruce Momjian wrote: >> I am not so much the libpq++ maintainer as the one who applies people's >> patches. There is an interfaces list that would love to hear about your >> work. I am CC'ing them on this. We certainly need libpq++ improvements. >> If you would prefer not to deal with the interfaces list, send something >> to me and I will send it over there. J> Working on rewrite--can do some serious work once my new laptop arrives. OK. The shmem stuff requires some more work in order for the cursor stuff to work right, anyway. -justinb -- Justin Banks Tricord, Inc. justinb@tricord.com In the good old days physicists repeated each other's experiments, just to be sure. Today they stick to FORTRAN, so that they can share each other's programs, bugs included. - Dijkstra 1975 From tgl@sss.pgh.pa.us Thu May 3 19:14:38 2001 Received: from sss.pgh.pa.us (sss.pgh.pa.us [216.151.103.158]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f43JEaA59949 for ; Thu, 3 May 2001 15:14:38 -0400 (EDT) (envelope-from tgl@sss.pgh.pa.us) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.11.3/8.11.3) with ESMTP id f43JD1R29890; Thu, 3 May 2001 15:13:01 -0400 (EDT) To: justinb@mr-boo.com cc: Bruce Momjian , justinb@tricord.com, PostgreSQL-interfaces Subject: Re: Re: libpq++ In-reply-to: <15085.24280.868910.556829@dervish.mr-boo.com> References: <15084.18414.123450.642118@idoru.tricord.com> <200104292004.f3TK4nf21949@candle.pha.pa.us> <15085.24280.868910.556829@dervish.mr-boo.com> Comments: In-reply-to Justin Banks message dated "Mon, 30 Apr 2001 07:53:02 -0500" Date: Thu, 03 May 2001 15:13:00 -0400 Message-ID: <29887.988917180@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200105/12 X-Sequence-Number: 1538 Justin Banks writes: > As one would have expected, I've found a problem. The c++ std. says that > Automatic objects are not destroyed as a result of calling exit(), and so, a > automatic PgDatabase in main() (or most anywhere, actually), would not have > it's destructor called during an exit(), thereby leaving junk shm. segments > around. Unless your kernel is broken, application exit will cause the backend connection to be closed, whereupon the backend will exit gracefully. I see nothing to worry about here. I'm not sure where you got this notion that clients get to touch any of Postgres' shared memory ;-) but they don't. regards, tom lane From pgman@candle.pha.pa.us Thu May 3 19:16:33 2001 Received: from candle.pha.pa.us (candle.navpoint.com [162.33.245.46]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f43JGWA60901 for ; Thu, 3 May 2001 15:16:33 -0400 (EDT) (envelope-from pgman@candle.pha.pa.us) Received: (from pgman@localhost) by candle.pha.pa.us (8.10.1/8.10.1) id f43JFpf12056; Thu, 3 May 2001 15:15:51 -0400 (EDT) From: Bruce Momjian Message-Id: <200105031915.f43JFpf12056@candle.pha.pa.us> Subject: Re: Re: libpq++ In-Reply-To: <29887.988917180@sss.pgh.pa.us> "from Tom Lane at May 3, 2001 03:13:00 pm" To: Tom Lane Date: Thu, 3 May 2001 15:15:51 -0400 (EDT) CC: justinb@mr-boo.com, justinb@tricord.com, PostgreSQL-interfaces X-Mailer: ELM [version 2.4ME+ PL90 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Archive-Number: 200105/16 X-Sequence-Number: 1542 > Justin Banks writes: > > As one would have expected, I've found a problem. The c++ std. says that > > Automatic objects are not destroyed as a result of calling exit(), and so, a > > automatic PgDatabase in main() (or most anywhere, actually), would not have > > it's destructor called during an exit(), thereby leaving junk shm. segments > > around. > > Unless your kernel is broken, application exit will cause the backend > connection to be closed, whereupon the backend will exit gracefully. > I see nothing to worry about here. > > I'm not sure where you got this notion that clients get to touch any > of Postgres' shared memory ;-) but they don't. I think he is creating his own shared memory area: --------------------------------------------------------------------------- What I'd like to have happen is for a total of one connection to the database to be made, and have all these objects share that connection transparently. I made this happen by using a shared memory segment to store the connection pointer. Here's the diff. It doesn't seem to break anything, but then again, my coverage is rather limited at this point. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026 From tgl@sss.pgh.pa.us Thu May 3 19:27:15 2001 Received: from sss.pgh.pa.us (sss.pgh.pa.us [216.151.103.158]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f43JRDA64952 for ; Thu, 3 May 2001 15:27:15 -0400 (EDT) (envelope-from tgl@sss.pgh.pa.us) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.11.3/8.11.3) with ESMTP id f43JPbR00302; Thu, 3 May 2001 15:25:37 -0400 (EDT) To: Bruce Momjian cc: justinb@mr-boo.com, justinb@tricord.com, PostgreSQL-interfaces Subject: Re: Re: libpq++ In-reply-to: <200105031915.f43JFpf12056@candle.pha.pa.us> References: <200105031915.f43JFpf12056@candle.pha.pa.us> Comments: In-reply-to Bruce Momjian message dated "Thu, 03 May 2001 15:15:51 -0400" Date: Thu, 03 May 2001 15:25:36 -0400 Message-ID: <299.988917936@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200105/14 X-Sequence-Number: 1540 Bruce Momjian writes: > I think he is creating his own shared memory area: Oh, I see. Isn't that pretty silly, considering that there's no way for such objects to share a DBconnection if they are in different application processes? Seems like a simple static variable would do the job just as well with a lot fewer portability and resource-leakage issues... regards, tom lane From justinb@tricord.com Fri May 4 19:02:13 2001 Received: from postgresql.org.org (webmail.postgresql.org [216.126.85.28]) by postgresql.org (8.11.3/8.11.1) with SMTP id f44J2DA00862 for ; Fri, 4 May 2001 15:02:13 -0400 (EDT) (envelope-from pgsql-interfaces-owner@postgresql.org) Received: from idoru.tricord.com ([64.240.27.94]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f43JbjA68694 for ; Thu, 3 May 2001 15:37:46 -0400 (EDT) (envelope-from justinb@tricord.com) Received: (from justinb@localhost) by idoru.tricord.com (8.9.3/8.9.3) id OAA28292; Thu, 3 May 2001 14:37:24 -0500 From: Justin Banks MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15089.45940.490466.456420@idoru.tricord.com> Date: Thu, 3 May 2001 14:37:24 -0500 (CDT) X-no-archive: yes Reply-To: justinb@tricord.com X-Supreme-Numerical-Value: Bleen To: Tom Lane Cc: Bruce Momjian , justinb@tricord.com, PostgreSQL-interfaces Subject: Re: Re: libpq++ In-Reply-To: <299.988917936@sss.pgh.pa.us> References: <200105031915.f43JFpf12056@candle.pha.pa.us> <299.988917936@sss.pgh.pa.us> X-Mailer: VM 6.75 under 21.1 (patch 14) "Cuyahoga Valley" XEmacs Lucid X-Archive-Number: 200105/22 X-Sequence-Number: 1548 >>>>> "Tom" == Tom Lane writes: Tom> Bruce Momjian writes: >> I think he is creating his own shared memory area: Tom> Oh, I see. Isn't that pretty silly, considering that there's no way Tom> for such objects to share a DBconnection if they are in different Tom> application processes? Seems like a simple static variable would do Tom> the job just as well with a lot fewer portability and resource-leakage Tom> issues... If you have a class, say 'class host', that represents a table in your database, in which you are storing host information, and you want each host to also be a database object, you now have two choices, as far as I can tell. You can connect to the database in the chain of constructors somewhere, or you can put it off until you actually issue a query of some kind. Either way, you get punished quite severely if you want say, a int N = 75; host * cluster_of_boxes = new host[N](default_parameters_of_some_kind); since you either then have N connections to the backend, or every time you want to go to the DB you take a big hit. With my modification, you only get one connection to the backend, and all your host objects share it. You're right - this only works because the shared connections all occur in the same address space. It doesn't buy you anything between applications, only inside an application. The problem is that there's no way for different instantiations of classes inheriting database-ness from the PgDatabase class to share a PGconn* unless the PgDatabase class provides a way for different instantiations to know that existing connections are available. -justinb -- Justin Banks Tricord, Inc. justinb@tricord.com "The time you enjoy wasting is not wasted time." - Bertrand Russell From tgl@sss.pgh.pa.us Thu May 3 19:42:25 2001 Received: from sss.pgh.pa.us (sss.pgh.pa.us [216.151.103.158]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f43JgPA70428 for ; Thu, 3 May 2001 15:42:25 -0400 (EDT) (envelope-from tgl@sss.pgh.pa.us) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.11.3/8.11.3) with ESMTP id f43JgHR00821; Thu, 3 May 2001 15:42:17 -0400 (EDT) To: justinb@tricord.com cc: Bruce Momjian , PostgreSQL-interfaces Subject: Re: Re: libpq++ In-reply-to: <15089.45940.490466.456420@idoru.tricord.com> References: <200105031915.f43JFpf12056@candle.pha.pa.us> <299.988917936@sss.pgh.pa.us> <15089.45940.490466.456420@idoru.tricord.com> Comments: In-reply-to Justin Banks message dated "Thu, 03 May 2001 14:37:24 -0500" Date: Thu, 03 May 2001 15:42:16 -0400 Message-ID: <818.988918936@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200105/13 X-Sequence-Number: 1539 Justin Banks writes: > You're right - this only works because the shared connections all > occur in the same address space. It doesn't buy you anything between > applications, only inside an application. The problem is that there's > no way for different instantiations of classes inheriting > database-ness from the PgDatabase class to share a PGconn* unless the > PgDatabase class provides a way for different instantiations to know > that existing connections are available. And what's wrong with a static class variable for that purpose? The shmem segment looks like the hardest possible way to get the same result. regards, tom lane From justinb@tricord.com Fri May 4 19:02:27 2001 Received: from postgresql.org.org (webmail.postgresql.org [216.126.85.28]) by postgresql.org (8.11.3/8.11.1) with SMTP id f44J2RA00930 for ; Fri, 4 May 2001 15:02:27 -0400 (EDT) (envelope-from pgsql-interfaces-owner@postgresql.org) Received: from idoru.tricord.com ([64.240.27.94]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f43L6LA02148 for ; Thu, 3 May 2001 17:06:22 -0400 (EDT) (envelope-from justinb@tricord.com) Received: (from justinb@localhost) by idoru.tricord.com (8.9.3/8.9.3) id QAA29330; Thu, 3 May 2001 16:05:43 -0500 From: Justin Banks MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15089.51239.362206.595914@idoru.tricord.com> Date: Thu, 3 May 2001 16:05:43 -0500 (CDT) X-no-archive: yes Reply-To: justinb@tricord.com X-Supreme-Numerical-Value: Bleen To: Tom Lane Cc: justinb@tricord.com, Bruce Momjian , PostgreSQL-interfaces Subject: Re: Re: libpq++ In-Reply-To: <818.988918936@sss.pgh.pa.us> References: <200105031915.f43JFpf12056@candle.pha.pa.us> <299.988917936@sss.pgh.pa.us> <15089.45940.490466.456420@idoru.tricord.com> <818.988918936@sss.pgh.pa.us> X-Mailer: VM 6.75 under 21.1 (patch 14) "Cuyahoga Valley" XEmacs Lucid X-Archive-Number: 200105/20 X-Sequence-Number: 1546 >>>>> "Tom" == Tom Lane writes: Tom> And what's wrong with a static class variable for that purpose? The Tom> shmem segment looks like the hardest possible way to get the same Tom> result. I'm kinda embarrased to say I didn't think of that, actually. That would only mean exposing the default constructor of PgDatabase, so the derived class could put off connecting indefinitely, right? -justinb -- Justin Banks Tricord, Inc. justinb@tricord.com From pgman@candle.pha.pa.us Wed May 9 17:35:46 2001 Received: from candle.pha.pa.us (candle.navpoint.com [162.33.245.46]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f49HZkA38562 for ; Wed, 9 May 2001 13:35:46 -0400 (EDT) (envelope-from pgman@candle.pha.pa.us) Received: (from pgman@localhost) by candle.pha.pa.us (8.10.1/8.10.1) id f49HZgi13955; Wed, 9 May 2001 13:35:42 -0400 (EDT) From: Bruce Momjian Message-Id: <200105091735.f49HZgi13955@candle.pha.pa.us> Subject: Re: libpq++ In-Reply-To: <20010307205247.E3900@cistron.nl> "from J. T. Vermeulen at Mar 7, 2001 08:52:47 pm" To: "J. T. Vermeulen" Date: Wed, 9 May 2001 13:35:42 -0400 (EDT) CC: pgsql-interfaces@postgresql.org X-Mailer: ELM [version 2.4ME+ PL90 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Archive-Number: 200105/47 X-Sequence-Number: 1573 > Is anyone maintaining libpq++? My patches are beginning to seriously > overlap each other, making it hard to submit them individually. > > If there's nobody out there, I'd be willing to maintain this code and > make more extensive changes. In particular, I would like to: > > - introduce exceptions instead of manual checking, as suggested in TODO; > - update the manual; > - review all the little consts, bools, explicits and such; > - replace PgTransaction by a more fine-grained and exception-safe > mechanism outside the PgDatabase hierarchy; > - provide STL-conformant interfaces for iterating over result sets; > - allow fields to be accessed in a type-safe manner; > - ensure clean compilation under g++ 3.0; > - bring functionality up-to-date with libpq if, as & where needed > > Would that be OK? Sure. I can apply your patches now whenever I receive them. This will allow others to work with your changes right away. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026 From moreno@mochima.com Wed May 9 19:12:59 2001 Received: from mochima.com (mail6.burlee.com [199.93.70.32]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f49JCxA77488 for ; Wed, 9 May 2001 15:12:59 -0400 (EDT) (envelope-from moreno@mochima.com) Date: Wed, 9 May 2001 15:15:46 -0400 Message-Id: <200105091515.AA58851606@mochima.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii From: "Carlos Moreno" Reply-To: To: "J. T. Vermeulen" , Bruce Momjian CC: Subject: Re: libpq++ X-Mailer: X-Archive-Number: 200105/49 X-Sequence-Number: 1575 >> - provide STL-conformant interfaces for iterating over result sets; >> - allow fields to be accessed in a type-safe manner; This would be beautiful! I can picture myself having fun writing code like this: conn.Exec ("select ....."); copy (conn.tuples().begin(), conn.tuples().end(), ostream_iterator (cout, "\n")); (or even conn.begin(), conn.end()) or: void custom_print_row (const tuple & row) { cout << "ID: " << row["ID"] << endl << "Name: " << row["name"] << endl << "Age: " << current_year() - row["year_born"] << endl << endl; } for_each (conn.begin(), conn.end(), custom_print_row); Things like that... Definitely nice! Carlos -- From jtv@cistron-office.nl Mon May 14 13:17:13 2001 Received: from smtp.cistron-office.nl (10fwd.cistron-office.nl [195.64.65.197]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f4EDHDA74552 for ; Mon, 14 May 2001 09:17:13 -0400 (EDT) (envelope-from jtv@cistron-office.nl) Received: from slipstream.cistron-office.nl ([195.64.65.252]) by smtp.cistron-office.nl with smtp (Exim 3.22 #1 (Debian)) id 14zIDe-0006Mr-00; Mon, 14 May 2001 15:17:02 +0200 Received: by slipstream.cistron-office.nl (sSMTP sendmail emulation); Mon, 14 May 2001 15:17:02 +0200 From: "J. T. Vermeulen" Date: Mon, 14 May 2001 15:17:02 +0200 To: Carlos Moreno Cc: "J. T. Vermeulen" , Bruce Momjian , pgsql-interfaces@postgresql.org Subject: Re: libpq++ Message-ID: <20010514151702.F14645@cistron.nl> Mail-Followup-To: Carlos Moreno , "J. T. Vermeulen" , Bruce Momjian , pgsql-interfaces@postgresql.org References: <200105091515.AA58851606@mochima.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.17i In-Reply-To: <200105091515.AA58851606@mochima.com>; from moreno@mochima.com on Wed, May 09, 2001 at 03:15:46PM -0400 X-Disclaimer: Include standard disclaimer here. X-Archive-Number: 200105/65 X-Sequence-Number: 1592 On Wed, 09 May 2001, Carlos Moreno wrote: > >> - provide STL-conformant interfaces for iterating over result sets; > >> - allow fields to be accessed in a type-safe manner; > > This would be beautiful! I can picture myself having fun > writing code like this: One drawback is there won't be any non-const iterators on queries, nor proper interaction with input iterators. Still thinking about that. From redhog@redhog.org Thu Jan 2 10:25:32 2003 Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 2D20947627A for ; Thu, 2 Jan 2003 05:25:32 -0500 (EST) Received: from redhog.org (q94.ryd.student.liu.se [130.236.217.94]) by postgresql.org (Postfix) with ESMTP id 9C0B447617A for ; Thu, 2 Jan 2003 05:25:31 -0500 (EST) Received: from localhost (localhost.localdomain [127.0.0.1]) by redhog.org (Postfix) with ESMTP id D29295FA22 for ; Thu, 2 Jan 2003 07:09:56 +0100 (CET) Date: Thu, 2 Jan 2003 07:09:56 +0100 (CET) From: Egil Moeller X-Sender: Reply-To: To: Subject: libpq Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200301/6 X-Sequence-Number: 3506 I'm ATM trying to use the libpq to access a PostgreSQL 7.2 database with multibyte character encoding turned on and set to UNICODE. Client encoding is UNICODE, too. I'm trying to insert data into a table with a column of type bytea, escaping the data using PQescapeBytea (and of course surrounding its output with ' and ' in the insert statement). However, when doing so, I get the error message 'ERROR: Unterminated quoted string'. How come this happens, and what may I have done wrong? I am also curious as to why there is no PQunescapeBytea in 7.2 (there is one in 7.3, according to the documentation). How is data returned from a select of a bytea field to be interpreted? Regards, Egil P.S. Please do rreply to my personal address, aswell as to the list, as I have the recieve-mail option turned of for this list. D.S. -- http://redhog.org GPG Public key: http://redhog.org/PGP%20Public%20key.asc Hi! I'm a .signature virus! Copy me into your ~/.signature to help me spread! From joshh@cti.co.za Thu Jun 26 13:06:18 2003 X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.193]) by svr1.postgresql.org (Postfix) with ESMTP id 766A230F175 for ; Thu, 26 Jun 2003 13:06:18 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (svr1.postgresql.org [64.117.224.193]) (amavisd-new, port 10024) with ESMTP id 48177-06 for ; Thu, 26 Jun 2003 10:06:03 -0300 (ADT) Received: from first-lx3.storage.co.za (first-lx3.storage.co.za [196.31.129.138]) by svr1.postgresql.org (Postfix) with ESMTP id C609B30FA07 for ; Thu, 26 Jun 2003 10:06:00 -0300 (ADT) Received: from stargate.cti.co.za ([192.168.211.5]) by first-lx3.storage.co.za (8.11.6/8.11.6) with ESMTP id h5QD6tg30234 for ; Thu, 26 Jun 2003 15:06:56 +0200 Received: from joshh (user11 [192.168.1.11]) by stargate.cti.co.za (8.11.2/8.9.3) with SMTP id h5QD7Sn01735 for ; Thu, 26 Jun 2003 15:07:35 +0200 Reply-To: From: "Josh Harris" To: Subject: libpq++ Date: Thu, 26 Jun 2003 15:03:52 +0200 Message-ID: <001e01c33be3$65443650$0b01a8c0@cti.co.za> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Importance: Normal X-MailScanner: Found to be clean X-MailScanner-Information: Please contact the ISP for more information X-Archive-Number: 200306/96 X-Sequence-Number: 4307 Hi there. I am having trouble getting C++ to interface with a PostgreSQL database. I want to use the libpq++ library, but can't quite figure out quite how. I am using PostgreSQL 7.3.1 on WinXP. This distribution doesn't seem to have shipped with libpq++, so I downloaded it seperately. The problem is that I can't seem to get any of the example code to compile. I am using MinGW. I have linked my project to the libpq.a library, included all the source files in the libpq++4.0 folder that I downloaded, and specified the path to their headers. Does anyone have any experience with libpq++ on windows using MinGW? Any help would be much appreciated. Thanks, Josh Harris. joshh@cti.co.za From creid@netbcg.com Thu Oct 23 20:01:25 2003 X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 2BC45D1B541 for ; Thu, 23 Oct 2003 20:01:25 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 25318-05 for ; Thu, 23 Oct 2003 17:00:55 -0300 (ADT) Received: from mail.netbcg.com (ip-216-46-80-134.dsl.ewr.megapath.net [216.46.80.134]) by svr1.postgresql.org (Postfix) with SMTP id DF712D1B520 for ; Thu, 23 Oct 2003 17:00:52 -0300 (ADT) Received: (qmail 21683 invoked from network); 23 Oct 2003 20:00:54 -0000 Received: from ip-216-46-80-134.dsl.ewr.megapath.net (HELO genesis) (216.46.80.134) by 0 with SMTP; 23 Oct 2003 20:00:54 -0000 From: "creid" To: Subject: LIBPQ Date: Thu, 23 Oct 2003 16:01:11 -0400 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=2.2 tagged_above=0.0 required=5.0 tests=BAYES_70, MSGID_GOOD_EXCHANGE X-Spam-Level: ** X-Archive-Number: 200310/43 X-Sequence-Number: 4532 Can anyone help me understand what it is I need to do to simply retrieve date and time columns into C variables that are readable. All other columns are come across successfully but the date and time. I have tried double to store the pg date and char[9] for time, among other typedef tries. My psotgres columns are defined as: mytime time, mydate date. Thanks C From jasiek@klaster.net Mon Oct 27 07:10:30 2003 X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 128C3D1B50A for ; Mon, 27 Oct 2003 07:10:30 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 92905-03 for ; Mon, 27 Oct 2003 03:10:00 -0400 (AST) Received: from serwer.skawsoft.com.pl (serwer.skawsoft.com.pl [213.25.37.66]) by svr1.postgresql.org (Postfix) with ESMTP id A1CCAD1B4FB for ; Mon, 27 Oct 2003 03:09:57 -0400 (AST) Received: from klaster.net (core-1.citynet.pl [80.48.135.69]) by serwer.skawsoft.com.pl (Postfix) with ESMTP id 01C142B3CB; Mon, 27 Oct 2003 08:09:52 +0100 (CET) Message-ID: <3F9CC4E3.702@klaster.net> Date: Mon, 27 Oct 2003 08:10:27 +0100 From: Tomasz Myrta User-Agent: Mozilla/5.0 (Windows; U; Win 9x 4.90; pl-PL; rv:1.5) Gecko/20030916 X-Accept-Language: pl, en-us, en MIME-Version: 1.0 To: creid Cc: pgsql-interfaces@postgresql.org Subject: Re: LIBPQ References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200310/51 X-Sequence-Number: 4540 Dnia 2003-10-23 22:01, U¿ytkownik creid napisa³: > Can anyone help me understand what it is I need to do to simply retrieve > date and time columns into C variables that are readable. All other columns > are come across successfully but the date and time. I have tried double to > store the pg date and char[9] for time, among other typedef tries. My > psotgres columns are defined as: mytime time, mydate date. > > Thanks > C 1. char[9] is too short for displaying time. Default text representation of time is: 08:06:05.474477 You can: - use longer variable char[16] - format your time to have 08:06:05 only using to_char(...) - change your columns from "time" to "time(0)" 2. char[9] is also too short for date. Default text representation for date (European format) is: 2003-10-27 You need char[11] for this. Regards, Tomasz Myrta From anis_wn@gawab.com Mon Oct 27 16:55:37 2003 X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 12195D1B4FE for ; Mon, 27 Oct 2003 16:55:37 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 85812-05 for ; Mon, 27 Oct 2003 12:55:06 -0400 (AST) Received: from gawab.com (www.gawab.com [204.97.230.36]) by svr1.postgresql.org (Postfix) with SMTP id 8EB5ED1B4F4 for ; Mon, 27 Oct 2003 12:55:05 -0400 (AST) Received: (qmail 51567 invoked by uid 1004); 27 Oct 2003 16:52:43 -0000 Message-ID: <20031027165242.51566.qmail@gawab.com> Received: from 202.158.124.21 by www.gawab.com with HTTP; Mon, 27 Oct 2003 16:52:42 GMT From: "Anis W. Nugroho" To: pgsql-interfaces@postgresql.org Subject: Re: LIBPQ Date: Mon, 27 Oct 2003 16:52:42 GMT Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Originating-IP: [202.158.124.21] X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200310/54 X-Sequence-Number: 4543 The efficient way to prepare your variables is test the query in the postgres front-end (psql) watch the result from the query and set your variable up according to that result. Good luck, Anis WN ________________________________ 15 Mbytes Free Web-based and POP3 Sign up now: http://www.gawab.com From ber_44@yahoo.com Fri Mar 18 20:34:30 2005 X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id DCD7F56A2E for ; Fri, 18 Mar 2005 20:34:30 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 56709-06 for ; Fri, 18 Mar 2005 20:34:12 +0000 (GMT) Received: from web51701.mail.yahoo.com (web51701.mail.yahoo.com [206.190.38.219]) by svr1.postgresql.org (Postfix) with SMTP id D92CD56965 for ; Fri, 18 Mar 2005 20:34:10 +0000 (GMT) Received: (qmail 58842 invoked by uid 60001); 18 Mar 2005 20:34:11 -0000 Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; b=GTXtMelJsLkiYDwUWKZjfjoco3HIcu6JZOgwxOV08XoeqvMbDfDWmC2vSGkLZCfMRcR3/sdOmcxTiGRlWXf5Phal1OG7++o0PFDibbQYPzW1ycrd0QFgdcRnTePay1qAiQggWVT5zBbOgwl4M6mmDrYuScLvDn0jUiNqmffgsC0= ; Message-ID: <20050318203411.58840.qmail@web51701.mail.yahoo.com> Received: from [213.134.20.162] by web51701.mail.yahoo.com via HTTP; Fri, 18 Mar 2005 12:34:11 PST Date: Fri, 18 Mar 2005 12:34:11 -0800 (PST) From: Gabor Berenyi Subject: fwd: libpq To: PostgreSQL-patches , pgsql-interfaces@postgresql.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.89 tagged_above=0 required=5 tests=DNS_FROM_RFC_ABUSE, FROM_ENDS_IN_NUMS X-Spam-Level: X-Archive-Number: 200503/57 X-Sequence-Number: 5386 My letter was rejected so I uploaded the attachement: http://school.tar.hu/maybe_a_dll_bug.zip Here is the letter itself: Now I send you [...] a bug report (maybe_a_dll_bug.zip). I think it's not a libpq.dll bug, but a related one at least. I would very much appreciate your help. maybe_a_dll_bug.zip contains a simple project that dynamically loads libpq.dll and doesn't work. Wine says (under Linux): validation failed for vsinit.dll Win98 and XP say: error in MSVCRT.DLL Can you compile and run this simple project (it contains no Borland-specific code, at least not the Windows part)? Do I have the wrong DLLs? If yes, could you send me the correct ones, please? Thank you. With love, Gabor __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/