X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 02577567B2 for ; Mon, 14 Mar 2005 18:16:14 +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 12813-02 for ; Mon, 14 Mar 2005 18:16:03 +0000 (GMT) Received: from iracema.dnscenter.com.br (iracema.dnscenter.com.br [67.15.80.70]) by svr1.postgresql.org (Postfix) with ESMTP id 94AD7567D2 for ; Mon, 14 Mar 2005 18:16:02 +0000 (GMT) Received: from cpanel by iracema.dnscenter.com.br with local (Exim 4.44) id 1DAu6e-0006wg-35 for pgsql-sql@postgresql.org; Mon, 14 Mar 2005 15:15:56 -0300 Received: from 200.158.187.253 ([200.158.187.253]) by www.presserv.org (Horde) with HTTP for ; Mon, 14 Mar 2005 15:15:55 -0300 Message-ID: <20050314151555.6kp8nfclzy5cogg0@www.presserv.org> Date: Mon, 14 Mar 2005 15:15:55 -0300 From: lucas@presserv.org To: pgsql-sql@postgresql.org Subject: Generic Function MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Internet Messaging Program (IMP) H3 (4.0) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - iracema.dnscenter.com.br X-AntiAbuse: Original Domain - postgresql.org X-AntiAbuse: Originator/Caller UID/GID - [32001 502] / [47 12] X-AntiAbuse: Sender Address Domain - presserv.org X-Source: X-Source-Args: X-Source-Dir: X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=1.033 tagged_above=0 required=5 tests=AWL, NO_REAL_NAME, RCVD_IN_NJABL_PROXY X-Spam-Level: * X-Archive-Number: 200503/202 X-Sequence-Number: 20681 Hi, Can I built a generic function like: CREATE FUNCTION f (text) RETURNS TEXT as $$ return 'select * from $1'; $$ I know its impossible as writed. Also I have looked for EXECUTE procedure but it not run the correct function. Is there a way to construct this clause? Using plpgsql/pltcl/anything.... ??? Thanks