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 D5ED43A4E0E for ; Fri, 7 Jan 2005 05:44:14 +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 66136-08 for ; Fri, 7 Jan 2005 05:44:06 +0000 (GMT) Received: from candle.pha.pa.us (candle.pha.pa.us [207.106.42.251]) by svr1.postgresql.org (Postfix) with ESMTP id DBD023A4DC1 for ; Fri, 7 Jan 2005 05:44:05 +0000 (GMT) Received: (from pgman@localhost) by candle.pha.pa.us (8.11.6/8.11.6) id j075i6p01311; Fri, 7 Jan 2005 00:44:06 -0500 (EST) From: Bruce Momjian Message-Id: <200501070544.j075i6p01311@candle.pha.pa.us> Subject: Re: ECPGstatus documentation In-Reply-To: <41DD77ED.1030306@onesystem.com> To: Edmund Bacon Date: Fri, 7 Jan 2005 00:44:06 -0500 (EST) Cc: pgsql-interfaces@postgresql.org X-Mailer: ELM [version 2.4ME+ PL108 (25)] MIME-Version: 1.0 Content-Type: multipart/mixed; boundary=ELM1105076646-24925-0_ Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.004 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200501/2 X-Sequence-Number: 5228 --ELM1105076646-24925-0_ Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII OK, fixed, patch applied and attached. Are there any other ecpg documentation additions needed? --------------------------------------------------------------------------- Edmund Bacon wrote: > I've just spent a half hour or so trying to figure out why a call to > ECPGstatus() was complaining about the wrong number of arguments. The > documentation states: > > ECPGstatus() returns true if you are connected to a database and false > if not. > > However, digging through the archives, I found the following from Jan 7, > 2000: > > > ECPGstatus() seems to have changed to ECPGstatus (int, const char); > > What exactly am I supposed to pass to this function? > > The first argument is the line-number (i.e. __LINE__). The second is the > connection name. If you do not have different connections you can use > NULL as connection name or just use "CURRENT". > > Michael > > So, could either the documentation be updated to reflect the correct > parameters to ECPGstatus() or perhaps > src/interfaces/ecpg/preproc/preproc.y can be patched to Do The Right > Thing? If I had any experience with bison/yacc/lex/flex/whatever, I'd > take a look at it, but as I don't ... :-( > > Thanks. > > -- > Edmund Bacon > > ---------------------------(end of broadcast)--------------------------- > TIP 4: Don't 'kill -9' the postmaster > -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073 --ELM1105076646-24925-0_ Content-Transfer-Encoding: 7bit Content-Type: text/plain Content-Disposition: inline; filename="/bjm/diff" Index: doc/src/sgml/ecpg.sgml =================================================================== RCS file: /cvsroot/pgsql/doc/src/sgml/ecpg.sgml,v retrieving revision 1.60 diff -c -c -r1.60 ecpg.sgml *** doc/src/sgml/ecpg.sgml 28 Dec 2004 22:47:15 -0000 1.60 --- doc/src/sgml/ecpg.sgml 7 Jan 2005 05:42:27 -0000 *************** *** 1610,1617 **** ! ECPGstatus() returns true if you ! are connected to a database and false if not. --- 1610,1620 ---- ! ECPGstatus(int lineno, ! const char* connection_name) ! returns true if you are connected to a database and false if not. ! connection_name can be NULL ! if a single connection is being used. --ELM1105076646-24925-0_--