Re: Variables inside plpythonu

Поиск
Список
Период
Сортировка
От Frank Lanitz
Тема Re: Variables inside plpythonu
Дата
Msg-id 20120512170135.182e51593fce48545fe52078@frank.uvena.de
обсуждение исходный текст
Ответ на Re: Variables inside plpythonu  (Adrian Klaver <adrian.klaver@gmail.com>)
Список 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>

Вложения

В списке pgsql-general по дате отправления:

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: Variables inside plpythonu
Следующее
От: Jasen Betts
Дата:
Сообщение: Re: Is there away to output a time stamp in a specified time zone with the time zone indicator (e.g. EDT)