From: Craig Orsinger <orsingerc@epg-gw1.lewis.army.mil>
To: Andreas Theofilu <theofilu@eunet.at>
Cc: pgsql-interfaces@postgreSQL.org
Subject: RE: [INTERFACES] ecpg and getting just assigned serial number
Date: Mon, 13 Sep 1999 11:49:03 -0700 (PDT)
Message-ID: <XFMail.990913114903.orsingerc@epg-gw1.lewis.army.mil> (raw)
In-Reply-To: <99091316123503.01664@theofilu>
On 13-Sep-99 Andreas Theofilu wrote:
> I can write such a function, of course. But I will not break compatibility
> to Informix, because both databases, PostgreSQL _and_ Informix are
> supported in only a single source file.
I've tried to do this myself, and in the long run I think
you'll be better off planning on having two different versions of
embedded C, or at least, two different sets of functions that do
certain operations. Informix ESQL/C and ecpg have significantly
different syntax, especially regarding CURSORs and FETCHs. If you
keep things simple, and have some way of converting database names
between the two systems, you can undoubtedly do what you're trying
to do. Anything else and it gets really difficult. While Informix
supports EXEC SQL IFDEF, PostgreSQL does not appear to.
An alternative might be to have a single source file that
can be modified by a sed or awk script to conform to whatever
embedded SQL you're using at the moment. I considered this approach,
but didn't pursue it because I didn't have the time.
We had a discussion here about this subject in June. The
subject was "esql/c documentation". If you can't find it in the
archive, I can e-mail some of the more interesting posts in that
thread.
----------------------------------
Date: 13-Sep-99 Time: 10:55:47
Craig Orsinger (email: <orsingerc@epg-gw1.lewis.army.mil>)
Logicon RDA
Bldg. 8B28 "Just another megalomaniac with ideas above his
6th & F Streets station. The Universe is full of them."
Ft. Lewis, WA 98433 - The Doctor
----------------------------------
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: orsingerc@epg-gw1.lewis.army.mil, theofilu@eunet.at, pgsql-interfaces@postgreSQL.org
Subject: Re: [INTERFACES] ecpg and getting just assigned serial number
In-Reply-To: <XFMail.990913114903.orsingerc@epg-gw1.lewis.army.mil>
References: <99091316123503.01664@theofilu> <XFMail.990913114903.orsingerc@epg-gw1.lewis.army.mil>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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