SET STANDARD_CONFORMING_STRINGS

Treats backslashes as escape characters for the current session.

Syntax

SET STANDARD_CONFORMING_STRINGS TO { ON | OFF }

Parameters

ON

Makes ordinary string literals ('...') treat back slashes (\) literally. This means that back slashes are treated as string literals, not escape characters. (This is the default.)

OFF

Treats back slashes as escape characters.

Privileges

No special permissions required.

Notes

Tip: To set conforming strings across all sessions (permanently), use theStandardConformingStrings as described in Internationalization Parameters in the Administrator's Guide.

Examples

The following example shows how to turn off conforming strings for the session.

=> SET STANDARD_CONFORMING_STRINGS TO OFF;

The following command lets you verify the settings:

=> SHOW STANDARD_CONFORMING_STRINGS;
            name             | setting
-----------------------------+---------
 standard_conforming_strings | off
(1 row)

The following example shows how to turn on conforming strings for the session.

=> SET STANDARD_CONFORMING_STRINGS TO ON;