pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Mario Splivalo <mario.splivalo@mobart.hr>
To: pgsql-sql@postgresql.org
Subject: Re: RETURNS SETOF primitive returns results in parentheses
Date: Wed, 26 Oct 2005 15:09:20 +0200
Message-ID: <1130332161.7400.56.camel@ekim> (raw)
In-Reply-To: <BF84F4DB.11C9D%sdavis2@mail.nih.gov>
References: <BF84F4DB.11C9D%sdavis2@mail.nih.gov>

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."





view thread (8+ messages)  latest in thread

Message-ID: <1130332161.7400.56.camel@ekim>
Permalink:  ../1130332161.7400.56.camel@ekim/
Also on:    postgresql.org/message-id/1130332161.7400.56.camel@ekim

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: mario.splivalo@mobart.hr
  Subject: Re: RETURNS SETOF primitive returns results in parentheses
  In-Reply-To: <1130332161.7400.56.camel@ekim>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox