Re: Variables inside plpythonu

From: Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Variables inside plpythonu
Date: 2012-05-12 15:01:35
Message-ID: 20120512170135.182e51593fce48545fe52078@frank.uvena.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sat, 12 May 2012 07:11:08 -0700
Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com> 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])
> plpy.notice(date_rs[0]["id_fld"])
> $Body$
> language plpythonu;

Yes. Gave me the missing piece. Thanks a lot!

Cheers,
Frank
--
Frank Lanitz <frank(at)frank(dot)uvena(dot)de>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jasen Betts 2012-05-13 03:02:37 Re: Is there away to output a time stamp in a specified time zone with the time zone indicator (e.g. EDT)
Previous Message Adrian Klaver 2012-05-12 14:11:08 Re: Variables inside plpythonu