Thank you for your ideas. I thought about the "fake" library myself
even though our project is more like 20 - 30k lines, but I'm not sure
how bad it would be. I'm aware of the SQL dialects, but we have tried to
make a point of using "standard" SQL syntax. Of course we might have to
develop some triggers/functions that are not available in SQLite at the
moment.
I was hoping someone had already done something along these lines before.
Leif
Joe Wilson wrote:
--- Leif Jensen <[EMAIL PROTECTED]> wrote:
In a larger project we are using PostgreSQL database and Embedded SQL
in C (using ECPG) in a server daemon. We would like to be able to have this to work with
SQLite for a stand-alone application. The Embedded SQL in C standard is
as used by Oracle (and former Informix) and of course PostgreSQL.
Does anyone know of an Embedded SQL in C (pre-compiler/interface)
that will work with SQLite ?
I am not aware of such a pre-compiler for SQLite.
If your project is quite large (100,000+ lines of code) then porting
PostgreSQL's embedded C compiler ECPG to SQLite may be a viable alternative.
http://doxygen.postgresql.org/dir_45ac211730e8147f7f879781af2b8b2a.html
The main porting effort would be in the ecpglib/ directory, mapping all
PQ-prefixed postgres functions and the PG-prefixed data structures to their
SQLite equivalents.
http://doxygen.postgresql.org/dir_9bd0bfe8893f57601e39e3093fd54938.html
A possibly simpler approach may be to construct a "fake" libpq library for
use by the PostgreSQL ECPG program that does all the mappings to/from sqlite3.
You'd only have to support the subset of libpq functions actually used
by ECPG.
But even if you did such a port using either approach, be aware that the
SQL dialects of Postgres and SQLite are not the same - you'd likely have
to change some of the embedded SQL statements in your code.
____________________________________________________________________________________Sick sense of humor? Visit Yahoo! TV's
Comedy with an Edge to see what's on, when.
http://tv.yahoo.com/collections/222
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------