Re: ecpg preprocessor regression in 9.0 - Mailing list pgsql-bugs

From Korry Douglas
Subject Re: ecpg preprocessor regression in 9.0
Date
Msg-id 2EE12379-4A35-40A8-977B-0CC43B8A7FEB@enterprisedb.com
Whole thread Raw
In response to Re: ecpg preprocessor regression in 9.0  (Michael Meskes <meskes@postgresql.org>)
List pgsql-bugs
>> On closer look, it's quite obvious: the code added to
>> ECPGdump_a_type thinks that ECPGt_const is a variable type, and
>> tries to look up the variable. The straightforward fix is this:
>> ...
>> But I wonder if there is a better way to identify variable-kind of
>> ECPGttypes than list the ones that are not. There's some special
>> ECPGttypes still missing from the above if-test, like
>> ECPGt_NO_INDICATOR, but I'm not sure if they can ever be passed to
>> ECPGdump_a_type. Seems a bit fragile anyway.
>
> I agree. How about adding a macro definition explicitely checking
> for the real
> variable types?

Why not a function instead of a macro?  You can set a breakpoint on a
function if you need to debug.

It seems unlikely that you would every see any measurable performance
gain by writing a macro instead of a function.


        -- Korry

pgsql-bugs by date:

Previous
From: Michael Meskes
Date:
Subject: Re: ecpg preprocessor regression in 9.0
Next
From: "Dirk Heinrichs"
Date:
Subject: BUG #5740: contrib/spi/moddatetime.c doesn't work with timezones.