Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 49BB39FA66C for ; Mon, 6 Aug 2007 16:44:59 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 96808-04 for ; Mon, 6 Aug 2007 16:44:51 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from hm323.locaweb.com.br (hm323-1.locaweb.com.br [200.234.205.180]) by postgresql.org (Postfix) with SMTP id C1ACD9FBAD1 for ; Mon, 6 Aug 2007 16:44:53 -0300 (ADT) Received: (qmail 23719 invoked from network); 6 Aug 2007 19:44:47 -0000 Received: from unknown (10.1.10.193) by hm323.locaweb.com.br with QMQP; 6 Aug 2007 19:44:47 -0000 Received: from unknown (HELO ?172.16.2.72?) (rmazili@wgsystems.com.br@200.162.219.207) by hm506.locaweb.com.br with SMTP; 6 Aug 2007 19:45:02 -0000 Message-ID: <46B77A1D.4050908@wgsystems.com.br> Date: Mon, 06 Aug 2007 16:44:29 -0300 From: Ranieri Mazili User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) MIME-Version: 1.0 To: pgsql-general@postgresql.org, pgsql-sql@postgresql.org Subject: Using function like where clause Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.781 tagged_above=0 required=5 tests=AWL=-0.219, BAYES_60=1 X-Spam-Level: X-Archive-Number: 200708/354 X-Sequence-Number: 118203 Hello, I have 2 questions. 1) Can I use a function that will return a string in a where clause like bellow? select * from table where my_function_making_where() and another_field = 'another_think' 2) Can I use a function that will return a string to return the list of columns that I want to show like below? select my_function_making_list_of_columns() from table where field_test = 'mydatum' Thanks