Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 4C10A9FC2A4; Fri, 10 Aug 2007 05:00:54 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 58809-02-2; Fri, 10 Aug 2007 05:00:45 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from depesz.com (depesz.com [88.198.37.40]) by postgresql.org (Postfix) with ESMTP id CB8309FBFA5; Fri, 10 Aug 2007 05:00:48 -0300 (ADT) Received: from depesz by depesz.com with local (Exim 4.63) (envelope-from ) id 1IJPQN-0008Mt-2n; Fri, 10 Aug 2007 10:00:47 +0200 Date: Fri, 10 Aug 2007 10:00:47 +0200 From: hubert depesz lubaczewski To: Ranieri Mazili Cc: pgsql-general@postgresql.org, pgsql-sql@postgresql.org Subject: Re: [SQL] Using function like where clause Message-ID: <20070810080047.GB31829@depesz.com> Reply-To: depesz@depesz.com References: <46B77A1D.4050908@wgsystems.com.br> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <46B77A1D.4050908@wgsystems.com.br> User-Agent: Mutt/1.5.13 (2006-08-11) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200708/519 X-Sequence-Number: 118368 On Mon, Aug 06, 2007 at 04:44:29PM -0300, Ranieri Mazili wrote: > 1) Can I use a function that will return a string in a where clause like > bellow? > 2) Can I use a function that will return a string to return the list of > columns that I want to show like below? not in sql. you can in pl/pgsql. depesz -- quicksil1er: "postgres is excellent, but like any DB it requires a highly paid DBA. here's my CV!" :) http://www.depesz.com/ - blog dla ciebie (i moje CV)