O idee ar fi sa iti faci o functie apelabila in sql: http://www.postgresql.org/docs/current/static/plperl.html
Alternative la Perl sunt Tcl si Python. O alta idee ar fi sa faci modificarea din programul care apeleaza UPDATE-ul dar nu este intotdeauna cea mai eficienta solutie. Bafta, Radu Quoting Patrascu Eugeniu <[EMAIL PROTECTED]>: > 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) > > iD8DBQBAD6Xa4tIxIjowr7IRAp2/AJ96oWnR84gtJlvvf8CungRyJYsv/gCeJ6Dx > taIIJTsygmXdsatEYPtsh/A= > =QRrl > -----END PGP SIGNATURE----- > > > > --- > Detalii despre listele noastre de mail: http://www.lug.ro/ > > > ------------------------------------------------- Everyone should have http://www.freedom2surf.net/ --- Detalii despre listele noastre de mail: http://www.lug.ro/
