select with function per row

From: Marcin Mazurek <M(dot)Mazurek(at)poznan(dot)multinet(dot)pl>
To: pgsql-sql(at)postgresql(dot)org
Subject: select with function per row
Date: 2000-10-30 09:02:13
Message-ID: 20001030100213.G32288@poznan.mtl.pl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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/

Browse pgsql-sql by date

  From Date Subject
Next Message Lengyel Ferenc 2000-10-30 12:36:23
Previous Message The Hermit Hacker 2000-10-30 00:37:14 pgsql-sql list should now work again ...