Michael wrote:
> I just got a bug report that originated in the programmer not knowing he had
> to include sqlca to use whenever. When I told him he asked me why it isn't
> included automatically. Now that's a tricky question. :-)
> 
> I do know that Oracle also asks the programmer to include 
> sqlca, but how
> about other DBs? Infromix? Sybase? DB2? Does anyone know that?

Informix includes 
#include <sqlhdr.h>
#include <sqliapi.h>
automatically. 

sqlhdr.h then includes sqlca, sqlda, locator.h and most of the other headers.

Andreas

Wed, 9 Jan 2002 10:14:36 +0100
"Zeugswetter Andreas SB SD" <ZeugswetterA@spardat.at>
Re: ECPG: include sqlca
Zeugswetter Andreas SB SD wrote:
> Michael wrote:
> > I just got a bug report that originated in the programmer not knowing he had
> > to include sqlca to use whenever. When I told him he asked me why it isn't
> > included automatically. Now that's a tricky question. :-)
> > 
> > I do know that Oracle also asks the programmer to include 
> > sqlca, but how
> > about other DBs? Infromix? Sybase? DB2? Does anyone know that?
> 
> Informix includes 
> #include <sqlhdr.h>
> #include <sqliapi.h>
> automatically. 
> 
> sqlhdr.h then includes sqlca, sqlda, locator.h and most of the other headers.

Also, we are allowed to be better than other databases.  I recommend
auto-include, perhaps with a message to the user.

-- 
  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

Wed, 9 Jan 2002 10:45:44 -0500 (EST)
Bruce Momjian <pgman@candle.pha.pa.us>
Re: ECPG: include sqlca
On Wed, Jan 09, 2002 at 10:45:44AM -0500, Bruce Momjian wrote:
> > sqlhdr.h then includes sqlca, sqlda, locator.h and most of the other headers.
> 
> Also, we are allowed to be better than other databases.  I recommend
> auto-include, perhaps with a message to the user.

Very valid point. I will commit this in a few minutes.

Michael
-- 
Michael Meskes
Michael@Fam-Meskes.De
Go SF 49ers! Go Rhein Fire!
Use Debian GNU/Linux! Use PostgreSQL!

Thu, 10 Jan 2002 11:37:23 +0100
Michael Meskes <meskes@postgresql.org>
Re: ECPG: include sqlca