Re: failed to execute the psql case statement which has the function call.

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

 





On Tuesday, April 5, 2022, Nikhil Ingale <niks.bgm@xxxxxxxxx> wrote:
Hi All,

I've a case statement where I'm calling the user defined postgres function and failed to execute the same. Because it's assuming the variable passed inside the function as a column for the table.

You cannot use variables for identifiers in raw sql.  If you need to do that you must use dynamic sql - build a string using format and execute it.

David J.
 

[Index of Archives]     [Postgresql Home]     [Postgresql General]     [Postgresql Performance]     [Postgresql PHP]     [Postgresql Jobs]     [PHP Users]     [PHP Databases]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Yosemite Forum]

  Powered by Linux