Search Postgresql Archives

How to ensure column names are double quoted while using execute format when building a stored procedure?

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

 



The following command runs but does not produce results as expected.
 
Execute Format('insert into stats select %L as id, %2$L as checks, count(%3$s) from %4$s where %5$s is null', i, 'count of nulls in '||col, col, t_name, col);

There should be a lot of nulls in columns, but it produces o count.

All columns have got capital letters in.  How to ensure that the columns are double-quote when they are fed in as variables.

Regards,

David

[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 Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux