Re: BUG #15176: ecpg generation error

Поиск
Список
Период
Сортировка
От Michael Meskes
Тема Re: BUG #15176: ecpg generation error
Дата
Msg-id 14f85244af19f0607a188b581afa5b0a455554e9.camel@postgresql.org
обсуждение исходный текст
Ответ на BUG #15176: ecpg generation error  (PG Bug reporting form <noreply@postgresql.org>)
Ответы RE: BUG #15176: ecpg generation error  (Höppner, Uwe <uhoeppner@psi.de>)
Список pgsql-bugs
Dear Uwe,

> (yes, these empty lines are produced    by ecpg :-) )

Your point being?

> For select statements the generated code compiles, but IMO, the
> parameters
> of all sizeof() calls are wrong. I would expect code like this:

You obviously have no idea what this code is doing nor did you check
with the source code. So what makes you think you can educate us about
what the code should look like? May I remind you that ecpg has been
used for 20 years and on millions and millions of source code. You're
hardly the first one to use it.

>
> The result is even worse, if you try to insert into the database.
> the pgc-code:
> ...
> This code does not compile!

Compiles cleanly on my system.

> If you look to #line 39 you can see the definition of struct
> varchar_1
> inside of struct a_t in function fkt1. So this results in the
> following
> error message:
>
> 1>d:\dev\ems\master\src\db\bdp\app\pgtest\ctestapp.pc(67): error
> C2027:
> Verwendung des undefinierten Typs "fkt1::varchar_1"
> varchar_1 is unknown.

To everyone out there that does not read German, the error message says
that type "fkt1::varchar1" is undefined. Uwe, it surely helps sending
English error messages to an English language mailing list.

Not sure what you or your compiler are doing, but the last time I
checked defining a struct within a struct works nicely in *C*. It
probably does not in C++, but ecpg is not a C++ precompiler!

> After manual correction it compiles:

I hardly call commenting out these lines a correction.

> Could you please repair ecpg, so it generates code, that compiles. :-
> )

Could you please show a different attitude? Otherwise it's highly
unlikely anyone volunteers to use their spare time to help you. And
after all it seems to be you using ecpg wrongly and not ecpg being
buggy.

Michael

--
Michael Meskes
Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org)
Meskes at (Debian|Postgresql) dot Org
Jabber: michael at xmpp dot meskes dot org
VfL Borussia! Força Barça! SF 49ers! Use Debian GNU/Linux, PostgreSQL


В списке pgsql-bugs по дате отправления:

Предыдущее
От: Jan Hamal Dvořák
Дата:
Сообщение: to_json documentation wrt. casts is misleading
Следующее
От: "Carlsen, Len"
Дата:
Сообщение: RE: BUG #15171: JDBC TIMESTAMP WITH TIME ZONE PSQLException WhenUsing Substitution Parameter