Re: RETURNS SETOF primitive returns results in parentheses - Mailing list pgsql-sql

From Mario Splivalo
Subject Re: RETURNS SETOF primitive returns results in parentheses
Date
Msg-id 1130332161.7400.56.camel@ekim
Whole thread Raw
In response to Re: RETURNS SETOF primitive returns results in parentheses  (Sean Davis <sdavis2@mail.nih.gov>)
List pgsql-sql
On Wed, 2005-10-26 at 08:54 -0400, Sean Davis wrote:
> > Now, when I do this:
> > 
> > biblio3=# select * from php_get_subfield_data_repeating(1,'606a');
> > php_get_subfield_data_repeating1
> > ----------------------------------
> > (Anđeli)
> > (ofsajd)
> > (2 rows)
> 
> Does:
> 
> select * from php_get_subfield_data_repeating(1,'606a') as s(a)
> 
> do what you want (single column)?
> 

Nope. I still get the results in parentheses. When I change the SETOF
from varchar to my defined type, your query [with as s(a)] I get normal
resutls, withouth parentheses. I clearly have solved a problem, I just
need to create a type containing one member only, with the type of
varchar, and instead of 'RETURNS SETOF varchar' i need to do 'RETURNS
SETOF my_varchar_type'. I'm just wondering is this like that 'by
design', or is it a bug.

I've been reproducing this on postgres versions 7.4.8, 7.4.9, 8.0.3,
8.0.4 and 8.1beta3.
Mike
-- 
Mario Splivalo
Mob-Art
mario.splivalo@mobart.hr

"I can do it quick, I can do it cheap, I can do it well. Pick any two."




pgsql-sql by date:

Previous
From: Sean Davis
Date:
Subject: Re: RETURNS SETOF primitive returns results in parentheses
Next
From: Jan Wieck
Date:
Subject: Re: pl/* overhead ...