Skip to content

feat!: remove PG ? placeholder replacement#1180

Merged
johannes-vogel merged 10 commits into
mainfrom
fix-remove-placeholder-replacement
May 20, 2025
Merged

feat!: remove PG ? placeholder replacement#1180
johannes-vogel merged 10 commits into
mainfrom
fix-remove-placeholder-replacement

Conversation

@PDT42

@PDT42 PDT42 commented May 7, 2025

Copy link
Copy Markdown
Contributor

Currently, a regex is being used to detect ? placeholders in PostgreSQL queries and replace them with PG compliant $x placeholders. This PR removes that workaround and requires plain SQL queries to use placeholders from the appropriate SQL dialect. It also moves plain SQL tests out of the shared read test into dialect specific plain sql tests.

@PDT42 PDT42 requested a review from BobdenOs May 7, 2025 08:16
@PDT42 PDT42 marked this pull request as ready for review May 7, 2025 09:20
@patricebender

Copy link
Copy Markdown
Member

So I assume #1135 is a wont fix then?:)

@PDT42

PDT42 commented May 7, 2025

Copy link
Copy Markdown
Contributor Author

Yeah - I discussed with @BobdenOs that there should be less, not better custom handling, so I closed #1176 and removed the ? replacement entirely, in here. Thanks for the update you provided in #1135 @patricebender!

@johannes-vogel johannes-vogel merged commit a1e0bd9 into main May 20, 2025
6 checks passed
@johannes-vogel johannes-vogel deleted the fix-remove-placeholder-replacement branch May 20, 2025 08:29
@cap-bots cap-bots mentioned this pull request May 20, 2025
johannes-vogel added a commit that referenced this pull request May 28, 2025
🤖 I have created a release *beep* *boop*
---


<details><summary>db-service: 2.0.1</summary>

##
[2.0.1](db-service-v2.0.0...db-service-v2.0.1)
(2025-05-27)


### Fixed

* **`search`:** do not search on non-projected elements
([#1198](#1198))
([73d9e67](73d9e67))
* add shortcut for empty UPDATE.data
([#1203](#1203))
([cf991ff](cf991ff))
* hierarchies in quoted mode
([3465cba](3465cba))
* only sort by locale if locale is set
([#1193](#1193))
([3465cba](3465cba))


### Changed

* remove stream_compat
([#1139](#1139))
([#1144](#1144))
([1b8b2d9](1b8b2d9))
</details>

<details><summary>sqlite: 2.0.1</summary>

##
[2.0.1](sqlite-v2.0.0...sqlite-v2.0.1)
(2025-05-27)


### Changed

* remove stream_compat
([#1139](#1139))
([#1144](#1144))
([1b8b2d9](1b8b2d9))
</details>

<details><summary>postgres: 2.0.1</summary>

##
[2.0.1](postgres-v2.0.0...postgres-v2.0.1)
(2025-05-27)


### Fixed

* Enable mixing stream and normal parameters in queries
([#1179](#1179))
([7ee8083](7ee8083))
* hierarchies in quoted mode
([3465cba](3465cba))
* only sort by locale if locale is set
([#1193](#1193))
([3465cba](3465cba))


### Changed

* remove PG `?` placeholder replacement
([#1180](#1180))
([a1e0bd9](a1e0bd9))
* remove stream_compat
([#1139](#1139))
([#1144](#1144))
([1b8b2d9](1b8b2d9))
</details>

<details><summary>hana: 2.0.1</summary>

##
[2.0.1](hana-v2.0.0...hana-v2.0.1)
(2025-05-27)


### Added

* set NOW as session var in addition to $now
([#1201](#1201))
([33d4814](33d4814))
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Co-authored-by: D045778 <johannes.vogel@sap.com>
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.

Unquoted ? placeholders in raw SQL queries not replaced with positional parameters when preceded by quoted strings

3 participants