Search Postgresql Archives

Variables inside plpythonu

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

 



Hi folks, 

I did check the documentation but seem to didn't found the best way to
use plpythonu with a variable inside a query. 
Let's say I want to run this query 
SELECT id FROM some_table WHERE date=<date_from_function_call>
How a CREATE FUNCTION stateent have to look like? 
I already figured out that the python code should look similar to 

plan = plpy.prepare("SELECT id FROM some_table WHERE date=???? 
return = plpy.execure(plan)

But somehow a last piece is missing. 

Can anybody help?

Cheers, 
Frank
-- 
Frank Lanitz <frank@xxxxxxxxxxxxxx>

Attachment: pgpS0gWWu7XUT.pgp
Description: PGP signature


[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