New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strings are sometimes quoted incorrectly on Redshift #73

Closed
jakob opened this Issue Sep 21, 2015 · 2 comments

Comments

Projects
None yet
1 participant
@jakob
Owner

jakob commented Sep 21, 2015

Postico uses the PQescapeLiteral function for quoting strings sent to the server. When the string contains a backslash, PQescapeLiteral uses the "escape string syntax" for quoting the string, which is supported only by PostgreSQL 8.1 and later. This causes issues on Amazon Redshift, which is based on PostgreSQL 8.0.

This issue is also triggered by using a filter containing the percent sign or underscores, as these are quoted using a backslash, which again triggers the use of unsupported syntax.

I'll try to find an alternative; it looks like PQescapeStringConn doesn't use the incompatible syntax.

@jakob jakob added the bug label Sep 21, 2015

@jakob jakob added the started label Sep 29, 2015

@jakob

This comment has been minimized.

Show comment
Hide comment
@jakob

jakob Sep 30, 2015

Owner

I've changed the string quoting code to use PQescapeStringConn on PostgreSQL 8.0 and Redshift.
Prerelease build: https://eggerapps-downloads.s3.amazonaws.com/postico-2015-09-30.zip

Owner

jakob commented Sep 30, 2015

I've changed the string quoting code to use PQescapeStringConn on PostgreSQL 8.0 and Redshift.
Prerelease build: https://eggerapps-downloads.s3.amazonaws.com/postico-2015-09-30.zip

@jakob

This comment has been minimized.

Show comment
Hide comment
@jakob

jakob Oct 8, 2015

Owner

Version 0.27 with the fix is out now: https://eggerapps.at/postico/changelist.html

Owner

jakob commented Oct 8, 2015

Version 0.27 with the fix is out now: https://eggerapps.at/postico/changelist.html

@jakob jakob closed this Oct 8, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment