Skip to content
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

FEAT / FIX: support parameter placeholder escaping #891

Merged
merged 3 commits into from
Apr 28, 2020
Merged

FEAT / FIX: support parameter placeholder escaping #891

merged 3 commits into from
Apr 28, 2020

Conversation

qoomon
Copy link
Contributor

@qoomon qoomon commented Apr 22, 2020

escape parameter placeholder '?' by double question mark '??'

PostgreSQL documentation - https://jdbc.postgresql.org/documentation/head/statement.html

  • In JDBC, the question mark (?) is the placeholder for the positional parameters of a PreparedStatement. There are, however, a number of PostgreSQL operators that contain a question mark. To keep such question marks in a SQL statement from being interpreted as positional parameters, use two question marks (??) as escape sequence. You can also use this escape sequence in a Statement, but that is not required. Specifically only in a Statement a single (?) can be used as an operator.

should resolve #890

escape parameter placeholder '?' by double question mark '??'

PostgreSQL documentation - https://jdbc.postgresql.org/documentation/head/statement.html
* In JDBC, the question mark (?) is the placeholder for the positional parameters of a PreparedStatement. There are, however, a number of PostgreSQL operators that contain a question mark. To keep such question marks in a SQL statement from being interpreted as positional parameters, use two question marks (??) as escape sequence. You can also use this escape sequence in a Statement, but that is not required. Specifically only in a Statement a single (?) can be used as an operator.
@qoomon qoomon changed the title feat: support parameter placeholder escaping FEAT / FIX: support parameter placeholder escaping Apr 24, 2020
@Tapac Tapac merged commit 34042bb into JetBrains:master Apr 28, 2020
@qoomon qoomon deleted the patch-1 branch April 28, 2020 08:27
@qoomon qoomon mentioned this pull request May 6, 2020
@qoomon
Copy link
Contributor Author

qoomon commented May 13, 2020

may you can create a release for that fix? we desperately need this to use exposed with our postgreSQL database and jsonb columns.

@Tapac
Copy link
Contributor

Tapac commented May 13, 2020

@qoomon
Copy link
Contributor Author

qoomon commented May 14, 2020

Oh my bad I've looked at https://github.com/JetBrains/Exposed/releases. Thanks again

@JajaComp
Copy link
Contributor

JajaComp commented Sep 5, 2024

Now is broken

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PostgreSQL: exception when using jsonb question mark operator ('?')
3 participants