Postgresql Auto Backslash escape in Execute edit

by Nov 4, 2014

I just did an upgrade to one of my Postgres servers from 9.0 to 9.3. One of the changes is the way backslash is handled. I’ve set standard_conforming_strings = off so that my applications will still work until I can get a switch in and upgrade sites.

My question is about how Aqua Data studio changes backslashes I put into Execute edit grid. When I connect to a PG9.0 DB and enter in:
C:\Dir1\file1.txt the update automatically changes it to ‘C:\\Dir1\\file1.txt’

But when I connect to PG9.3 it does not and I need to remember to enter it in with all escaped backslashes.

Is there a way to change this so that a execute edit works the same when connected to PG9.3 as it does when connected to PG9.0?

Thanks,

Ron

Response

Niels Gron over 8 years ago
Hi Ron,

From the PostgreSQL documentation :
www.postgresql.org/…/runtime-config-compatible.html

standard_conforming_strings (boolean)
This controls whether ordinary string literals (‘…’) treat backslashes literally, as specified in the SQL standard. Beginning in PostgreSQL 9.1, the default is on (prior releases defaulted to off). Applications can check this parameter to determine how string literals will be processed. The presence of this parameter can also be taken as an indication that the escape string syntax (E’…’) is supported. Escape string syntax (Section 4.1.2.2) should be used if an application desires backslashes to be treated as escape characters.

So, this behavior change started with PG 9.1. ADS generates string literals for the Table Data Editor and Import Tool based on the default setting, but not the configured setting. I’ve logged an issue for this so we can get a patch out :

www.aquaclusters.com/…/13085

-Niels

Niels Gron over 8 years ago
Here is a patch with a fix for this issue :

Patch : www.aquafold.com/…/ads-15.0.14-6-patch.zip
Update Instructions : www.aquafold.com/support-update.html