X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id A9344D1B52C for ; Wed, 24 Sep 2003 17:30:48 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 76686-10 for ; Wed, 24 Sep 2003 14:30:17 -0300 (ADT) Received: from nt-groupware.cabal.com.ar (unknown [200.69.240.4]) by svr1.postgresql.org (Postfix) with ESMTP id B65E4D1B51A for ; Wed, 24 Sep 2003 14:30:15 -0300 (ADT) Received: by NT-GROUPWARE with Internet Mail Service (5.5.2653.19) id ; Wed, 24 Sep 2003 14:27:43 -0300 Message-ID: <9B9EF0AE4BCBD21190220008C74C77A903169B7C@NT-GROUPWARE> From: "Montervino, Mariano" To: 'Richard Huxton' , "'pgsql-sql@postgresql.org'" Subject: Re: Especial delimiters caracter Date: Wed, 24 Sep 2003 14:27:36 -0300 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200309/389 X-Sequence-Number: 15367 Thanks for your replay... I resolve the problem with sed before i post the question. But a really want to know if i can handle all with posgre script. Mariano -----Mensaje original----- De: Richard Huxton [mailto:dev@archonet.com] Enviado el: Mi=E9rcoles, 24 de Septiembre de 2003 14:19 Para: Montervino, Mariano; 'pgsql-sql@postgresql.org' Asunto: Re: [SQL] Especial delimiters caracter On Tuesday 23 September 2003 15:56, Montervino, Mariano wrote: > running the following script > > select ('cabal\\' || user_name) into temporary user_access from > tbl_user_access where access_profile_id =3D 4; > copy user_access to '/temp/users.txt' delimiters '|'; > > The result of the output file is... > domain\\users > but the field in the temp table is... > domain\users > > I need the same result like temp table. How could i do it?? > RGDS $ cat fakedump.txt C:\\Windows\\system32\\drivers|this\ttabbed\ttext\n $ perl -p -e 's/\\\\/\\/g;' fakedump.txt C:\Windows\system32\drivers|this\ttabbed\ttext\n As you can see, this only handles \\ not \t=3Dtab. You could also do this in sed: $ sed -e 's/\\\\/\\/g' fakedump.txt HTH --=20 Richard Huxton Archonet Ltd