Search Postgresql Archives

plpython/python string formatting

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

 



I've just started playing with plpython but ran into a issue when I
was trying to use standard python string formatting to generate a SQL
string for example:
s = "EXECUTE format('CREATE INDEX %s ON %s USING (column_name)' %
(index_name, table_name))"

but plpython then tried to run the EXECUTE instead of just setting
variable 's'. Why does this happen?

Ted





[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