Search Postgresql Archives

Re: Change Windows path to Unix path...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks,

That's exactly what I was looking for.


----------------------------------------------------------------------------
--------------- 
Patrick Fiche 
email : patrick.fiche@xxxxxxxxxxx 
tel : 01 69 29 36 18 
----------------------------------------------------------------------------
--------------- 




-----Original Message-----
From: pgsql-general-owner@xxxxxxxxxxxxxx
[mailto:pgsql-general-owner@xxxxxxxxxxxxxx]On Behalf Of Shelby Cain
Sent: mardi 26 avril 2005 17:52
To: Patrick.FICHE@xxxxxxxxxxx; pgsql-general@xxxxxxxxxxxxxx
Subject: Re:  Change Windows path to Unix path...



--- Patrick.FICHE@xxxxxxxxxxx wrote:
> Hi,
>  
> I'm trying to execute COPY command from some pgsql
> function.
> The filename is given as an argument of the
> function.
> But I get the filename like 'F:\tmp\file.txt' and I
> need to change this to
> 'F:/tmp/file.txt' before applying the COPY command.
>  
> I dind't succeed to replace '\' by '/' in the
> filename. 

Did you escape the backslash?  Postgresql interprets
that as a C-style escape sequence.

Try something like:

create function win32tounix(varchar) returns varchar
as $$
  select replace($1, '\\', '/');
$$ language sql;



__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux