Gerardo Herzig writes:
> Tom, thanks (as allways) for your answer. This is a 9.1.12. I have to say, im
> not very happy about if-elif-else'ing at all.
> The "conditional filter" es a pretty common pattern in our functions, i would
> have to add (and maintain) a substantial amount of extra code.
> CC: pgsql-performance@postgresql.org, "pgsql-sql"
> Enviados: Martes, 8 de Abril 2014 10:50:01
> Asunto: Re: [PERFORM] performance drop when function argument is evaluated in
> WHERE clause
>
> Gerardo Herzig writes:
> > Hi all. I have a function that uses a "si
Gerardo Herzig writes:
> Hi all. I have a function that uses a "simple" select between 3 tables. There
> is a function argument to help choose how a WHERE clause applies. This is the
> code section:
> select * from
> [...]
> where case $3
> when 'I' then [filter 1]
> when 'E' then [fil
Hi all. I have a function that uses a "simple" select between 3 tables. There
is a function argument to help choose how a WHERE clause applies. This is the
code section:
select * from
[...]
where case $3
when 'I' then [filter 1]
when 'E' then [filter 2]
when 'P' then [filter 3]
else