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