Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 3BAF2125102 for ; Tue, 15 May 2012 08:01:19 -0300 (ADT) Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SUFVG-0004Y7-67 for pgsql-sql@postgresql.org; Tue, 15 May 2012 11:01:18 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id q4FB14Ls021932; Tue, 15 May 2012 07:01:04 -0400 (EDT) To: Jan Bakuwel cc: pgsql-sql@postgresql.org Subject: Re: SELECT 1st field In-reply-to: <4FB1F13E.80302@greenpeace.org> References: <4FB1F13E.80302@greenpeace.org> Comments: In-reply-to Jan Bakuwel message dated "Tue, 15 May 2012 18:01:34 +1200" Date: Tue, 15 May 2012 07:01:04 -0400 Message-ID: <21931.1337079664@sss.pgh.pa.us> From: Tom Lane X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201205/40 X-Sequence-Number: 36588 Jan Bakuwel writes: > What I need is the ability to name the column in the view, ie. > create view v as select 1 as "id" from func(5); I think what you're looking for is the ability to re-alias a column name, for example select id from func(5) as foo(id); regards, tom lane