pg.ddx.io pgsql-interfaces@postgresql.org mailing list archive
help / color / mirror / Atom feedComment in ECPG - again
4+ messages / 2 participants
[nested] [flat]
* Comment in ECPG - again
@ 1999-04-22 08:06 Pavel PaJaSoft Janousek <janousek@fonet.cz>
1999-04-22 15:53 ` Re: [INTERFACES] Comment in ECPG - again Michael Meskes <meskes@postgresql.org>
0 siblings, 1 reply; 4+ messages in thread
From: Pavel PaJaSoft Janousek @ 1999-04-22 08:06 UTC (permalink / raw)
To: pgsql-interfaces
Hi all,
fine, ECPG doesn't know preprocesor macros as #if, #ifdef... - you
wrote, that this is ok, because this is preprocesor commands.
But why ECPG know '//' and '/*' and '*/' C/C++ style comments?
Somebody wrote, that ECPG translate only exec sql commands, not true,
when I write this:
//exec sql ssss
ECPG don't translate this line => it knows C/C++ comments... - this
construction is wrong, but ECPG doesn't say parse error on this line =>
skips it.
So, is ECPG only ESQL compiler (translator) or complex translator from
ESQL to C/C++? I think, that ECPG want be complex translator => it may know
also preprocesor directives....
-------------------------------------------------------------------------
Pavel Janousek (PaJaSoft) FoNet, spol. s r. o.
Vyvoj software, sprava siti, Unix, Web, Y2K Anenska 11, 602 00 Brno
E-mail: mailto:Janousek@FoNet.Cz Tel.: +420 5 4324 4749
SMS: mailto:P.Janousek@SMS.Paegas.Cz Fax.: +420 5 4324 4751
WWW: http://WWW.FoNet.Cz/ E-mail: mailto:Info@FoNet.Cz
--------------------------------------------------------------------------
-------------------------------------------------------------------------
Pavel Janousek (PaJaSoft) FoNet, spol. s r. o.
Vyvoj software, sprava siti, Unix, Web, Y2K Anenska 11, 602 00 Brno
E-mail: mailto:Janousek@FoNet.Cz Tel.: +420 5 4324 4749
SMS: mailto:P.Janousek@SMS.Paegas.Cz Fax.: +420 5 4324 4751
WWW: http://WWW.FoNet.Cz/ E-mail: mailto:Info@FoNet.Cz
--------------------------------------------------------------------------
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: [INTERFACES] Comment in ECPG - again
1999-04-22 08:06 Comment in ECPG - again Pavel PaJaSoft Janousek <janousek@fonet.cz>
@ 1999-04-22 15:53 ` Michael Meskes <meskes@postgresql.org>
0 siblings, 0 replies; 4+ messages in thread
From: Michael Meskes @ 1999-04-22 15:53 UTC (permalink / raw)
To: Pavel PaJaSoft Janousek <janousek@fonet.cz>; +Cc: pgsql-interfaces
On Thu, Apr 22, 1999 at 10:06:07AM +0200, Pavel PaJaSoft Janousek wrote:
> But why ECPG know '//' and '/*' and '*/' C/C++ style comments?
// is also an SQL comment. The backend will parse it correctly too.
/* ... */ was added for convenience. After all this is C code. But #include
is CPP code.
> Somebody wrote, that ECPG translate only exec sql commands, not true,
> when I write this:
> //exec sql ssss
This is not an exec sql command, but a comment.
> So, is ECPG only ESQL compiler (translator) or complex translator from
> ESQL to C/C++? I think, that ECPG want be complex translator => it may know
> also preprocesor directives....
Please do not mix C/C++ with CPP. After all all CPP commands do not belong
into the C language at all.
Michael
--
Michael Meskes | Go SF 49ers!
Th.-Heuss-Str. 61, D-41812 Erkelenz | Go Rhein Fire!
Tel.: (+49) 2431/72651 | Use Debian GNU/Linux!
Email: Michael.Meskes@gmx.net | Use PostgreSQL!
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: [INTERFACES] Comment in ECPG - again
@ 1999-04-23 07:53 Pavel PaJaSoft Janousek <janousek@fonet.cz>
1999-04-24 15:23 ` Re: [INTERFACES] Comment in ECPG - again Michael Meskes <meskes@postgresql.org>
0 siblings, 1 reply; 4+ messages in thread
From: Pavel PaJaSoft Janousek @ 1999-04-23 07:53 UTC (permalink / raw)
To: Michael Meskes <meskes@postgresql.org>; +Cc: pgsql-interfaces
Hi,
>> So, is ECPG only ESQL compiler (translator) or complex translator
from
>> ESQL to C/C++? I think, that ECPG want be complex translator => it may
know
>> also preprocesor directives....
>
>Please do not mix C/C++ with CPP. After all all CPP commands do not belong
>into the C language at all.
I wrote this bad before... - i know, that #if .. etc is CPP commands, so
my question is this:
Is correct way: ESQL source -> CPP -> ECPG -> C/C++ compiler?
I use EGCS, where I found C++ preprocesor? Parse this preprocessor only
#ifdef etc... commands? Doesn't it say error on exec sql statement?
-------------------------------------------------------------------------
Pavel Janousek (PaJaSoft) FoNet, spol. s r. o.
Vyvoj software, sprava siti, Unix, Web, Y2K Anenska 11, 602 00 Brno
E-mail: mailto:Janousek@FoNet.Cz Tel.: +420 5 4324 4749
SMS: mailto:P.Janousek@SMS.Paegas.Cz Fax.: +420 5 4324 4751
WWW: http://WWW.FoNet.Cz/ E-mail: mailto:Info@FoNet.Cz
--------------------------------------------------------------------------
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: [INTERFACES] Comment in ECPG - again
1999-04-23 07:53 Re: [INTERFACES] Comment in ECPG - again Pavel PaJaSoft Janousek <janousek@fonet.cz>
@ 1999-04-24 15:23 ` Michael Meskes <meskes@postgresql.org>
0 siblings, 0 replies; 4+ messages in thread
From: Michael Meskes @ 1999-04-24 15:23 UTC (permalink / raw)
To: Pavel PaJaSoft Janousek <janousek@fonet.cz>; +Cc: Michael Meskes <meskes@postgresql.org>; pgsql-interfaces
On Fri, Apr 23, 1999 at 09:53:51AM +0200, Pavel PaJaSoft Janousek wrote:
> Is correct way: ESQL source -> CPP -> ECPG -> C/C++ compiler?
I never tried this, but it will definitely work.
I use ESQL source -> ECPG -> CPP -> C/C++. Works well too, except that you
have to be syntactically correct even if you use #if 0. But then the
commercial products cannot handle CPP commands either to the best of my
knowledge.
> I use EGCS, where I found C++ preprocesor? Parse this preprocessor only
It's cpp. Yes, it comes with egcs too.
> #ifdef etc... commands? Doesn't it say error on exec sql statement?
It shouldn't. But as I said I never tried.
Michael
--
Michael Meskes | Go SF 49ers!
Th.-Heuss-Str. 61, D-41812 Erkelenz | Go Rhein Fire!
Tel.: (+49) 2431/72651 | Use Debian GNU/Linux!
Email: Michael.Meskes@gmx.net | Use PostgreSQL!
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~1999-04-24 15:23 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1999-04-22 08:06 Comment in ECPG - again Pavel PaJaSoft Janousek <janousek@fonet.cz>
1999-04-22 15:53 ` Michael Meskes <meskes@postgresql.org>
1999-04-23 07:53 Re: [INTERFACES] Comment in ECPG - again Pavel PaJaSoft Janousek <janousek@fonet.cz>
1999-04-24 15:23 ` Michael Meskes <meskes@postgresql.org>
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