Re: Variables inside plpythonu - Mailing list pgsql-general

From Frank Lanitz
Subject Re: Variables inside plpythonu
Date
Msg-id 20120512170135.182e51593fce48545fe52078@frank.uvena.de
Whole thread Raw
In response to Re: Variables inside plpythonu  (Adrian Klaver <adrian.klaver@gmail.com>)
List pgsql-general
On Sat, 12 May 2012 07:11:08 -0700
Adrian Klaver <adrian.klaver@gmail.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@frank.uvena.de>

Attachment

pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Variables inside plpythonu
Next
From: Jasen Betts
Date:
Subject: Re: Is there away to output a time stamp in a specified time zone with the time zone indicator (e.g. EDT)