Re: Question from a newbie

Поиск
Список
Период
Сортировка
От Michael Fuhr
Тема Re: Question from a newbie
Дата
Msg-id 20041008051729.GA49299@winnie.fuhr.org
обсуждение исходный текст
Ответ на Re: Question from a newbie  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
On Thu, Oct 07, 2004 at 10:55:03PM -0400, Tom Lane wrote:

>     return plpy.execute("select getcountrycode(\'9821788\')",1)

plpy.execute() returns a result object; querying a function that
returns a result object will probably look like this:

    test=> select test4();
                 test4
    --------------------------------
     <PLyResult object at 0x367140>
    (1 row)

The code should look more like this:

    result = plpy.execute("select getcountrycode(\'9821788\')",1)
    return result[0]["getcountrycode"]

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

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

Предыдущее
От: Dennis Gearon
Дата:
Сообщение: Re: flattened tables with normalized tables
Следующее
От: Miles Keaton
Дата:
Сообщение: when to use NULL and when to NOT NULL DEFAULT ''