pg.ddx.io pgsql-interfaces@postgresql.org mailing list archive
help / color / mirror / Atom feedECPGstatus documentation
2+ messages / 2 participants
[nested] [flat]
* ECPGstatus documentation
@ 2005-01-06 17:39 Edmund Bacon <ebacon@onesystem.com>
2005-01-07 05:44 ` Re: ECPGstatus documentation Bruce Momjian <pgman@candle.pha.pa.us>
0 siblings, 1 reply; 2+ messages in thread
From: Edmund Bacon @ 2005-01-06 17:39 UTC (permalink / raw)
To: pgsql-interfaces
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 <ebacon@onesystem.com>
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: ECPGstatus documentation
2005-01-06 17:39 ECPGstatus documentation Edmund Bacon <ebacon@onesystem.com>
@ 2005-01-07 05:44 ` Bruce Momjian <pgman@candle.pha.pa.us>
0 siblings, 0 replies; 2+ messages in thread
From: Bruce Momjian @ 2005-01-07 05:44 UTC (permalink / raw)
To: Edmund Bacon <ebacon@onesystem.com>; +Cc: pgsql-interfaces
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 <ebacon@onesystem.com>
>
> ---------------------------(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
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 ****
<listitem>
<para>
! <function>ECPGstatus()</function> returns true if you
! are connected to a database and false if not.
</para>
</listitem>
</itemizedlist>
--- 1610,1620 ----
<listitem>
<para>
! <function>ECPGstatus(int <replaceable>lineno</replaceable>,
! const char* <replaceable>connection_name</replaceable>)</function>
! returns true if you are connected to a database and false if not.
! <replaceable>connection_name</replaceable> can be <literal>NULL</>
! if a single connection is being used.
</para>
</listitem>
</itemizedlist>
Attachments:
[text/plain] /bjm/diff (980B, ../../200501070544.j075i6p01311@candle.pha.pa.us/2-%2Fbjm%2Fdiff)
download | inline:
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 ****
<listitem>
<para>
! <function>ECPGstatus()</function> returns true if you
! are connected to a database and false if not.
</para>
</listitem>
</itemizedlist>
--- 1610,1620 ----
<listitem>
<para>
! <function>ECPGstatus(int <replaceable>lineno</replaceable>,
! const char* <replaceable>connection_name</replaceable>)</function>
! returns true if you are connected to a database and false if not.
! <replaceable>connection_name</replaceable> can be <literal>NULL</>
! if a single connection is being used.
</para>
</listitem>
</itemizedlist>
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2005-01-07 05:44 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-01-06 17:39 ECPGstatus documentation Edmund Bacon <ebacon@onesystem.com>
2005-01-07 05:44 ` Bruce Momjian <pgman@candle.pha.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox