On Tue, Dec 15, 2009 at 02:19:19PM +0100, Boszormenyi Zoltan wrote:
> here's another patch that aims to fix auto-prepare.
> ...
> --- pgsql.6/src/interfaces/ecpg/preproc/output.c      2009-12-15 
> 13:12:37.000000000 +0100
> *************** hashline_number(void)
> *** 106,112 ****
>   }
>   
>   void
> ! output_statement(char *stmt, int whenever_mode, enum ECPG_statement_type st)
>   {
>   
>       fprintf(yyout, "{ ECPGdo(__LINE__, %d, %d, %s, %d, ", compat, 
> force_indicator, connection ? connection : "NULL", questionmarks);
> --- 106,112 ----
>   }
>   
>   void
> ! output_statement(char *stmt, int whenever_mode, enum ECPG_statement_type 
> st, int auto_prepare)
>   {
>   
>       fprintf(yyout, "{ ECPGdo(__LINE__, %d, %d, %s, %d, ", compat, 
> force_indicator, connection ? connection : "NULL", questionmarks);

Why do you add another argument to output_statement? You should easily be able
to use the existing ECPG_statement_type argument for this. How about changing
ECPGst_normal to ECPGst_normal and ECPGst_nonprep or something like this? Or
did I miss something?

Besides I don't think it's a good idea to create a local variable overriding a
global one with the same name. 


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: mes...@jabber.org
VfL Borussia! Forca Barca! Go SF 49ers! Use: Debian GNU/Linux, PostgreSQL

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to