Received: from yoyo.poznan.mtl.pl (yoyo.poznan.mtl.pl [212.160.241.173]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id e9U95e271979 for ; Mon, 30 Oct 2000 04:05:40 -0500 (EST) (envelope-from mazek@yoyo.poznan.mtl.pl) Received: by yoyo.poznan.mtl.pl (Postfix, from userid 1000) id AAAA11980C; Mon, 30 Oct 2000 10:02:13 +0100 (CET) Date: Mon, 30 Oct 2000 10:02:13 +0100 From: Marcin Mazurek To: pgsql-sql@postgresql.org Subject: select with function per row Message-ID: <20001030100213.G32288@poznan.mtl.pl> Mail-Followup-To: pgsql-sql@postgresql.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.2.5i Organization: Multinet S.A. X-Archive-Number: 200010/2 X-Sequence-Number: 2 Hi, I have a table with FQDN. I'm trying to take from it the second part which desribed a city. Query isn't too clear but with what is important that whole substr was counted once and applied to every row. Can I (how?) force executor to run this substr on every row of my table? mtldb=# select substr(substr(s.nazwa,strpos(s.nazwa,'a.')+2),1, textlen(s.nazwa)-strpos(s.nazwa,+'.m')) from serwery_old s; substr -------- poznan mtl.pl ka.kie tia maz Marcin Mazurek -- Kierownik Działu Systemowego MULTINET SA o/Poznan http://www.multinet.pl/