Thread: how to escape back-slash mark.

how to escape back-slash mark.

From
Quan Zongliang
Date:
hi, all

The PostgreSQL has a option: backslash_quote.
It can be on, off or safe_encoding.
How to set it to ingore back-slash check?

The command: INSERT INTO table_name VALUES(..., '\\', ...);
always get a warning message whatever it is.

If use E'\\', value will be saved as '\' in database.
Has a approach to let PostgreSQL conside back-slash as common char?

Regards.

-----------------------------------------------
Quan Zongliang
quanzongliang@gmail.com
CIT JAPAN: http://www.cit.co.jp
CIT CHINA: http://www.citbj.com.cn


Re: how to escape back-slash mark.

From
Tom Lane
Date:
Quan Zongliang <quanzongliang@gmail.com> writes:
> Has a approach to let PostgreSQL conside back-slash as common char?

I think you're looking for the "standard_conforming_strings" parameter.

            regards, tom lane

Re: how to escape back-slash mark.

From
Quan Zongliang
Date:
> I think you're looking for the "standard_conforming_strings" parameter.

Yes, it is.

Thanks