Re: ECPG patch N+1, fix auto-prepare - Mailing list pgsql-hackers

From Michael Meskes
Subject Re: ECPG patch N+1, fix auto-prepare
Date
Msg-id 20091215154234.GA22534@feivel.credativ.lan
Whole thread Raw
In response to Re: ECPG patch N+1, fix auto-prepare  (Boszormenyi Zoltan <zb@cybertec.at>)
Responses Re: ECPG patch N+1, fix auto-prepare  (Boszormenyi Zoltan <zb@cybertec.at>)
List pgsql-hackers
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: meskes@jabber.org
VfL Borussia! Forca Barca! Go SF 49ers! Use: Debian GNU/Linux, PostgreSQL


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Range types
Next
From: Andrew Dunstan
Date:
Subject: Re: Range types