Re: ECPG patch N+1, fix auto-prepare

Michael Meskes <meskes@postgresql.org>

From: Michael Meskes <meskes@postgresql.org>
To: Boszormenyi Zoltan <zb@cybertec.at>
Cc: Michael Meskes <meskes@postgresql.org>, pgsql-hackers@postgresql.org, Hans-Juergen Schoenig <hs@cybertec.at>
Date: 2009-12-16T10:14:03Z
Lists: pgsql-hackers
> OK, here's another approach. output_statement()'s interface
> is kept as the original, and not this function decides which

I still think this could be solved more easily.

> value it uses. I also introduced
>     static char *ecpg_statement_type_name[]
> for the textual names of the ECPGst_* symbols to keep the
> preprocessed code readable, and minimize the impact on the
> regression tests. So output_statement() always emits
> ECPGst_* symbols in the preprocessed code instead of
> ECPGst_normal/prepnormal and numeric value for the
> other two cases. This way only 7 regression tests' source
> has changed instead of 45... There are less
>     1 -> ECPGst_execute and
>     2 -> ECPGst_exec_immediate
> changes than
>     ECPGst_normal -> 0
> changes would have been if I chose emitting the numeric value.
> 
> Is it acceptable?

Yes sure.

I changed some small parts of your patch (see above) and will commit in a few
minutes. Just running regression tests.

Michael
-- 
Michael Meskes
Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org)
Michael at BorussiaFan dot De, Meskes at (Debian|Postgresql) dot Org
ICQ: 179140304, AIM/Yahoo/Skype: michaelmeskes, Jabber: meskes@jabber.org
VfL Borussia! Forca Barca! Go SF 49ers! Use: Debian GNU/Linux, PostgreSQL