Search Postgresql Archives

Re: SRF called with optional NULL input runs 7x slower

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ow Mun Heng wrote:

> Okay.. I tried that, but it seems like there's an issue w/ the CASE
> statements.
> 
> When I tried the prepare w/
> 
> AND (CASE WHEN $3 IS NULL THEN true else d.code = any ($3) END)
> AND (CASE WHEN $4 IS NULL THEN TRUE else D.id = any($4) END)
> 
> 
> it ERRORs w/ could not determine data type of parameter $3

Cast it to the correct type.

-- 
Alvaro Herrera       Valdivia, Chile   ICBM: S 39º 49' 18.1", W 73º 13' 56.4"
"Cómo ponemos nuestros dedos en la arcilla del otro. Eso es la amistad; jugar
al alfarero y ver qué formas se pueden sacar del otro" (C. Halloway en
La Feria de las Tinieblas, R. Bradbury)

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux