Question on Escape-string - Mailing list pgsql-sql

From John Zhang
Subject Question on Escape-string
Date
Msg-id 618950b80812311115g3f35f045u7c4ad90b1e613afc@mail.gmail.com
Whole thread Raw
List pgsql-sql
Dear all,<br /><br />I am using pl/pgsql to develop a function to implement some logic to load BLOB data, like .tif
file,to postgres DB. The issue I am facing is the file name MUST be with double back-slash \\ in order for pgsql to
processthe string properly. However, when the string is Escaped in my function, how can I pass it in to lo_import()
function?<br /><br />Is there any function to double back-slash a string? Or how can we preserve a string as RAW? <br
/><br/>---- ISSUE :<br />--         use E'C:\\tmp\\tst.tif' for the full file name for IN parameter of load_blob
function.<br/> --         however, when the string is escaped it becomes 'C:\tmp\tst.tif' as expected<br />--        
thefile name need be passed in to lo_import() function again without double \\<br />--         when it is passed in and
escaped, the \ is gone and the filename becomes meaningless <br /><br />Any input would be much appreciated!<br /><br
/>Thanksa lot<br />John<br /> 

pgsql-sql by date:

Previous
From: "Asko Oja"
Date:
Subject: Re: Object create date
Next
From: Steve Midgley
Date:
Subject: Re: Question on Escape-string