Re: Problems with stored procedure (function)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Marco Craveiro <marco(dot)craveiro(at)gmail(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Problems with stored procedure (function)
Date: 2009-12-18 19:33:20
Message-ID: 9952.1261164800@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

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

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Marco Craveiro 2009-12-19 14:19:17 Re: Problems with stored procedure (function)
Previous Message Marco Craveiro 2009-12-18 19:22:28 Problems with stored procedure (function)