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 by date:
Соглашаюсь с условиями обработки персональных данных