pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Embedded C++ with ecpg?
4+ messages / 2 participants
[nested] [flat]

* Embedded C++ with ecpg?
@ 2007-06-22 15:35  Jean-David Beyer <jeandavid8@verizon.net>
  0 siblings, 1 reply; 4+ messages in thread

From: Jean-David Beyer @ 2007-06-22 15:35 UTC (permalink / raw)
  To: pgsql-sql

I have a bunch of application programs written in C++ that use Embedded SQL.
This have been working for many years with IBM's DB2.

I am about to upgrade my Red Hat Enterprise Linux 3 system to RHEL 5, and I
would like to use postgresql instead of DB2. I cannot find an authoritative
statement that ecpg works with C++. There are hints here and there,
including old messages on this mailing list, that it either is meant to
work, that it partly works, or is silent.

What is the current status of (pre) compiling Embedded SQL in C++ programs?
I would absolutely hate to have to rewrite all these programs in C.

Red Hat seem to be on postgresql version 8.1.4 for the initial release of
RHEL5, and they may have updates a little higher.

-- 
  .~.  Jean-David Beyer          Registered Linux User 85642.
  /V\  PGP-Key: 9A2FC99A         Registered Machine   241939.
 /( )\ Shrewsbury, New Jersey    http://counter.li.org
 ^^-^^ 11:30:01 up 1 day, 19:05, 3 users, load average: 4.25, 4.25, 4.25



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Embedded C++ with ecpg?
@ 2007-06-22 17:28  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Jean-David Beyer <jeandavid8@verizon.net>
  0 siblings, 1 reply; 4+ messages in thread

From: Tom Lane @ 2007-06-22 17:28 UTC (permalink / raw)
  To: Jean-David Beyer <jeandavid8@verizon.net>; +Cc: pgsql-sql

Jean-David Beyer <jeandavid8@verizon.net> writes:
> What is the current status of (pre) compiling Embedded SQL in C++ programs?

I just asked Michael Meskes about that (had you put a support request
into Red Hat asking this?).  He says

: There are some C++ constructs that ecpg doesn't parse well, but they are
: not that widely used afaik. Most of the code compiles cleanly. And
: people used to workaround by just putting the sql part in a different
: source file where they didn't need those constructs.
: 
: Some effort has been made to make ecpg C++ compliant, so most should
: work out of the box.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Embedded C++ with ecpg?
@ 2007-06-22 17:43  Jean-David Beyer <jeandavid8@verizon.net>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 4+ messages in thread

From: Jean-David Beyer @ 2007-06-22 17:43 UTC (permalink / raw)
  To: pgsql-sql

Tom Lane wrote:
> Jean-David Beyer <jeandavid8@verizon.net> writes:
>> What is the current status of (pre) compiling Embedded SQL in C++ programs?
> 
> I just asked Michael Meskes about that (had you put a support request
> into Red Hat asking this?). 

Yes, and Red Hat's answer amounted to no answer at all. They merely repeated
a subset of what I already knew, which is why I placed the support request
in the first place.

> He says
> 
> : There are some C++ constructs that ecpg doesn't parse well, but they are
> : not that widely used afaik. Most of the code compiles cleanly. And
> : people used to workaround by just putting the sql part in a different
> : source file where they didn't need those constructs.
> : 
> : Some effort has been made to make ecpg C++ compliant, so most should
> : work out of the box.
> 
Thank you. I am glad to hear that. I imagine almost all my C++ constructs
are pretty simple. And most of my SQL ones are, too.

-- 
  .~.  Jean-David Beyer          Registered Linux User 85642.
  /V\  PGP-Key: 9A2FC99A         Registered Machine   241939.
 /( )\ Shrewsbury, New Jersey    http://counter.li.org
 ^^-^^ 13:35:01 up 1 day, 21:10, 3 users, load average: 4.16, 4.23, 4.19



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: [SQL] Embedded C++ with ecpg?
@ 2007-08-16 13:05  Jean-David Beyer <jeandavid8@verizon.net>
  parent: Jean-David Beyer <jeandavid8@verizon.net>
  0 siblings, 0 replies; 4+ messages in thread

From: Jean-David Beyer @ 2007-08-16 13:05 UTC (permalink / raw)
  To: pgsql-general@postgresql.org

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jean-David Beyer wrote:
> Tom Lane wrote:
>> Jean-David Beyer <jeandavid8@verizon.net> writes:
>>> What is the current status of (pre) compiling Embedded SQL in C++ programs?
>> I just asked Michael Meskes about that (had you put a support request
>> into Red Hat asking this?). 
> 
> Yes, and Red Hat's answer amounted to no answer at all. They merely repeated
> a subset of what I already knew, which is why I placed the support request
> in the first place.
> 
>> He says
>>
>> : There are some C++ constructs that ecpg doesn't parse well, but they are
>> : not that widely used afaik. Most of the code compiles cleanly. And
>> : people used to workaround by just putting the sql part in a different
>> : source file where they didn't need those constructs.
>> : 
>> : Some effort has been made to make ecpg C++ compliant, so most should
>> : work out of the box.
>>
> Thank you. I am glad to hear that. I imagine almost all my C++ constructs
> are pretty simple. And most of my SQL ones are, too.
> 
P.S.: I am pretty much able to compile my old C++ stuff. It probably will
not work right, but that is just a matter of subtle differences between DB2
and postgreSQL, and the differences between RHEL3 and RHEL5.

- --
  .~.  Jean-David Beyer          Registered Linux User 85642.
  /V\  PGP-Key: 9A2FC99A         Registered Machine   241939.
 /( )\ Shrewsbury, New Jersey    http://counter.li.org
 ^^-^^ 09:00:01 up 7 days, 12:22, 3 users, load average: 4.45, 4.41, 4.28
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with CentOS - http://enigmail.mozdev.org

iD8DBQFGxEuUPtu2XpovyZoRAqXIAKCZ41wtnlMSrkSZCWdZIhfg4hC6cQCfXfPs
QWNOruemVNWGcZyQGpeIWZ8=
=x/Lc
-----END PGP SIGNATURE-----



^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2007-08-16 13:05 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2007-06-22 15:35 Embedded C++ with ecpg? Jean-David Beyer <jeandavid8@verizon.net>
2007-06-22 17:28 ` Tom Lane <tgl@sss.pgh.pa.us>
2007-06-22 17:43   ` Jean-David Beyer <jeandavid8@verizon.net>
2007-08-16 13:05     ` Jean-David Beyer <jeandavid8@verizon.net>

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