replace() merge se pare pe 7.4, pe 7.2 nu. pe 7.2 e vreo functie
asemanatoare ?
multumesc,


On Thu, 2004-01-22 at 13:45, Alex Crivat wrote:
> update _tabel_ set path=replace(path, '/path/', '/new_path/');
> 
> On Thu, 2004-01-22 at 12:28, Patrascu Eugeniu wrote:
> > salut,
> > intr-un postgres am un tabel cu capuri de de felul:
> > 
> >  Column |       Type        | Modifiers 
> > --------+-------------------+-----------
> >  id     | numeric           | 
> >  path   | character varying | 
> > 
> > 
> > iar in tabel am inregistrari de genul:
> > 
> > 
> >  id |          path          
> > ----+------------------------
> >   1 | some/path/some_file
> >   2 | some/path/another_file
> > (2 rows)
> > 
> > 
> > problema e ca trebuie sa modific path-ul. astfel incat de
> > "some/path/some_file" sa am "some/new_path/some_file". stiu ca pgsql
> > stie de regular expressions si as vrea sa stiu care este echivalentul in
> > postgresql pentru un statement UPDATE pentru a realiza ce se face in sed
> > ~$ echo "/some/path/some_file" | sed -e "s/path/new_path/"
> >    /some/new_path/some_file
> > 
> > tia,
-- 
Patrascu Eugeniu <[EMAIL PROTECTED]>
NoBug Consulting Romania
Public GPG key at http://www.nobugconsulting.ro/e.patrascu.gpg


-- Attached file included as plaintext by Ecartis --
-- File: signature.asc
-- Desc: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQBAD8n04tIxIjowr7IRAk41AJ9cVDQ3cN0De5P4WAjqHGRoiNCxlgCfcG9r
MVCI8ZPY/tEgy6RKXlFuLLs=
=1uji
-----END PGP SIGNATURE-----



--- 
Detalii despre listele noastre de mail: http://www.lug.ro/


Raspunde prin e-mail lui