X-Original-To: pgsql-hackers-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id E7E4D8B9EE5; Thu, 10 Feb 2005 06:16:33 +0000 (GMT) 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 98186-06; Thu, 10 Feb 2005 06:16:25 +0000 (GMT) Received: from tigger.fuhr.org (tigger.fuhr.org [63.214.45.158]) by svr1.postgresql.org (Postfix) with ESMTP id 2AA098B9CB5; Thu, 10 Feb 2005 06:16:25 +0000 (GMT) Received: from winnie.fuhr.org (winnie.fuhr.org [10.1.0.1]) by tigger.fuhr.org (8.13.1/8.13.1) with ESMTP id j1A6GJi6020406 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 9 Feb 2005 23:16:22 -0700 (MST) (envelope-from mfuhr@winnie.fuhr.org) Received: from winnie.fuhr.org (localhost [127.0.0.1]) by winnie.fuhr.org (8.13.1/8.13.1) with ESMTP id j1A6GJd0059510; Wed, 9 Feb 2005 23:16:19 -0700 (MST) (envelope-from mfuhr@winnie.fuhr.org) Received: (from mfuhr@localhost) by winnie.fuhr.org (8.13.1/8.13.1/Submit) id j1A6GJLt059509; Wed, 9 Feb 2005 23:16:19 -0700 (MST) (envelope-from mfuhr) Date: Wed, 9 Feb 2005 23:16:19 -0700 From: Michael Fuhr To: "Ing. Jhon Carrillo" Cc: pgsql-hackers@postgresql.org, pgsql-sql@postgresql.org Subject: Re: [SQL] Function .. AS..? Message-ID: <20050210061619.GA59420@winnie.fuhr.org> References: <014201c50ee9$eee0dcd0$1400a8c0@tgusta2> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <014201c50ee9$eee0dcd0$1400a8c0@tgusta2> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.002 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200502/350 X-Sequence-Number: 64178 On Wed, Feb 09, 2005 at 04:57:14PM -0400, Ing. Jhon Carrillo wrote: > Those instructions are good but i want to call this function only > for " select consulta_contacto(1)" nothing more, Is really necesary > to use "AS ..."? > > this is the call: > > select * from consulta_contacto(1) as (cont_codigo integer, > cont_idpers varchar, > ... Instead of declaring the function to return SETOF RECORD, you could return SETOF typename, where "typename" is the name of a composite type or a table; your queries could then omit "AS ...." -- Michael Fuhr http://www.fuhr.org/~mfuhr/