Re: [GENERAL] Variables inside plpythonu

2012-05-12 Thread Frank Lanitz
On Sat, 12 May 2012 07:11:08 -0700 Adrian Klaver wrote: > Something like this?: > > create or replace function date_test(some_date date) returns void as > $Body$ > date_plan = plpy.prepare("select id_fld from date_test where date_fld > = $1", ["date"]) date_rs = plpy.execute(date_plan,[some_date

Re: [GENERAL] Variables inside plpythonu

2012-05-12 Thread Adrian Klaver
On 05/11/2012 11:43 PM, Frank Lanitz wrote: > 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= > How a CREATE FUNCTION stateent have to l

[GENERAL] Variables inside plpythonu

2012-05-11 Thread Frank Lanitz
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= How a CREATE FUNCTION stateent have to look like? I already figured out that the python code s