X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id DF92ADACBE for ; Wed, 26 Oct 2005 10:09:17 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 90154-08 for ; Wed, 26 Oct 2005 13:09:14 +0000 (GMT) Received: from pjetlic.mobart.hr (pjetlic.mobart.hr [80.80.51.10]) by svr1.postgresql.org (Postfix) with ESMTP id EE922D9FA1 for ; Wed, 26 Oct 2005 10:09:15 -0300 (ADT) Received: from localhost (localhost.localdomain [127.0.0.1]) by pjetlic.mobart.hr (Postfix) with ESMTP id 16D4317A2A for ; Wed, 26 Oct 2005 15:09:20 +0200 (CEST) Received: from pjetlic.mobart.hr ([127.0.0.1]) by localhost (pjetlic [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 16443-03-13 for ; Wed, 26 Oct 2005 15:09:20 +0200 (CEST) Received: from mike.mobart.hr (mike.mobart.hr [192.168.10.94]) (using SSLv3 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by pjetlic.mobart.hr (Postfix) with ESMTP id 009DD17A13 for ; Wed, 26 Oct 2005 15:09:20 +0200 (CEST) Subject: Re: RETURNS SETOF primitive returns results in parentheses From: Mario Splivalo Reply-To: mario.splivalo@mobart.hr To: pgsql-sql@postgresql.org In-Reply-To: References: Content-Type: text/plain; charset=UTF-8 Organization: Mob-Art Date: Wed, 26 Oct 2005 15:09:20 +0200 Message-Id: <1130332161.7400.56.camel@ekim> Mime-Version: 1.0 X-Mailer: Evolution 2.4.1 Content-Transfer-Encoding: 8bit X-Virus-Scanned: by OpenSource AV+AS Mail Server X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.004 required=5 tests=[AWL=0.004] X-Spam-Level: X-Archive-Number: 200510/323 X-Sequence-Number: 23176 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."