Re: Problems with stored procedure (function)

Поиск
Список
Период
Сортировка
От Marco Craveiro
Тема Re: Problems with stored procedure (function)
Дата
Msg-id d23da9a0912190619n30e845c0w1a6968f56ad221c4@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Problems with stored procedure (function)  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-novice
Tom,

This is indeed the answer to my problem, thanks very much. Any newbie
googling for an answer to this question may also be interested in the
following series of articles:

QUICK GUIDE TO WRITING PLPGSQL FUNCTIONS:

Part 1:
http://www.postgresonline.com/journal/index.php?/archives/58-Quick-Guide-to-writing-PLPGSQL-Functions-Part-1.html
Part 2:
http://www.postgresonline.com/journal/index.php?/archives/76-Quick-Guide-to-writing-PLPGSQL-Functions-Part-2.html
Part 3:
http://www.postgresonline.com/journal/index.php?/archives/83-Quick-Guide-to-writing-PLPGSQL-Functions-Part-3-NOTICES,-RECURSION,-and-more.html

Thanks

Marco

On 18/12/2009, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Marco Craveiro <marco.craveiro@gmail.com> writes:
>> The problem I have is my function keeps on returning a single column
>> with the name of the function, rather than something akin to the table
>> I've defined:
>
>> sanzala=# select load_country();
>>     load_country
>> --------------------
>>  (a,"b ","c  ",123)
>> (1 row)
>
> Yes, because that's what that syntax says to do: return one
> composite-type column.  The easiest way to expand it is
>
>     select * from load_country();
>
>             regards, tom lane
>


--
It's the golden rule: those who have the gold, rule. -- Gerald Celente

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Problems with stored procedure (function)
Следующее
От: lists@kambanaria.org
Дата:
Сообщение: How to use a db in UTF-8 encoding under Windows