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

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: (view raw, whole thread or download thread mbox)
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


pgsql-novice by date

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

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