Skip site navigation (1) Skip section navigation (2)

Re: Problems with stored procedure (function)

From: Marco Craveiro <marco(dot)craveiro(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Problems with stored procedure (function)
Date: 2009-12-19 14:19:17
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice

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:


Part 1:
Part 2:
Part 3:,-RECURSION,-and-more.html



On 18/12/2009, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Marco Craveiro <marco(dot)craveiro(at)gmail(dot)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

In response to

pgsql-novice by date

Next:From: listsDate: 2009-12-19 15:42:42
Subject: How to use a db in UTF-8 encoding under Windows
Previous:From: Tom LaneDate: 2009-12-18 19:33:20
Subject: Re: Problems with stored procedure (function)

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group