From: | Patrick(dot)FICHE(at)AQSACOM(dot)COM |
---|---|
To: | alyandon(at)yahoo(dot)com, pgsql-general(at)postgresql(dot)org |
Subject: | Re: Change Windows path to Unix path... |
Date: | 2005-04-27 06:12:03 |
Message-ID: | 1DC6C8C88D09D51181A40002A5286929B22E0D@intranet |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Thanks,
That's exactly what I was looking for.
----------------------------------------------------------------------------
---------------
Patrick Fiche
email : patrick(dot)fiche(at)aqsacom(dot)com
tel : 01 69 29 36 18
----------------------------------------------------------------------------
---------------
-----Original Message-----
From: pgsql-general-owner(at)postgresql(dot)org
[mailto:pgsql-general-owner(at)postgresql(dot)org]On Behalf Of Shelby Cain
Sent: mardi 26 avril 2005 17:52
To: Patrick(dot)FICHE(at)aqsacom(dot)com; pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] Change Windows path to Unix path...
--- Patrick(dot)FICHE(at)AQSACOM(dot)COM 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
From | Date | Subject | |
---|---|---|---|
Next Message | Hubert Fröhlich | 2005-04-27 06:17:30 | Re: oid wraparound |
Previous Message | Patrick TJ McPhee | 2005-04-27 05:19:32 | Re: PRIMARY KEY on a *group* of columns imply that each column is NOT |