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 46CE23A46E9 for ; Thu, 6 Jan 2005 17:40:33 +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 25737-09 for ; Thu, 6 Jan 2005 17:40:06 +0000 (GMT) Received: from happy.onesystem.ca (happy.onesystem.ca [205.206.61.17]) by svr1.postgresql.org (Postfix) with ESMTP id 6D87A3A46F9 for ; Thu, 6 Jan 2005 17:40:03 +0000 (GMT) Received: from elb_lx.onesystem.ca ([10.1.1.50]) by happy.onesystem.ca with asmtp (Exim 4.14) id 1Cmbc6-0000Tz-8R; Thu, 06 Jan 2005 10:39:58 -0700 Message-ID: <41DD77ED.1030306@onesystem.com> Date: Thu, 06 Jan 2005 10:39:57 -0700 From: Edmund Bacon User-Agent: Mozilla Thunderbird 0.9 (X11/20041103) X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-interfaces@postgresql.org Subject: ECPGstatus documentation Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200501/1 X-Sequence-Number: 5227 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