Skip to content

Db Pgsql getRawSql params replace fix#18592

Merged
bizley merged 3 commits intoyiisoft:masterfrom
sartor:fix/db-pgsql-raw-sql-params
Apr 2, 2021
Merged

Db Pgsql getRawSql params replace fix#18592
bizley merged 3 commits intoyiisoft:masterfrom
sartor:fix/db-pgsql-raw-sql-params

Conversation

@sartor
Copy link
Copy Markdown
Contributor

@sartor sartor commented Apr 1, 2021

Q A
Is bugfix? ✔️
New feature?
Breaks BC? possible
Tests pass? ✔️

using Postgresql there is error now with getRawSql function.

echo $db->createCommand("SELECT * FROM customer WHERE id::integer IN (:in, :out)", [':in' => 1, ':out' => 2])->getRawSql();

Expected: SELECT * FROM customer WHERE id::integer IN (1, 2)
Actual: SELECT * FROM customer WHERE id:1teger IN (1, 2)

This pull request fixes it

@bizley bizley added the type:bug Bug label Apr 1, 2021
@bizley
Copy link
Copy Markdown
Member

bizley commented Apr 1, 2021

Please add changelog line as well.

@bizley bizley added this to the 2.0.42 milestone Apr 2, 2021
@bizley bizley merged commit 6a04ac9 into yiisoft:master Apr 2, 2021
@bizley
Copy link
Copy Markdown
Member

bizley commented Apr 2, 2021

Thanks!

@sartor sartor deleted the fix/db-pgsql-raw-sql-params branch December 1, 2021 17:58
darkdef added a commit to darkdef/db-pgsql that referenced this pull request Jan 21, 2023
darkdef added a commit to yiisoft/db that referenced this pull request Jan 21, 2023
* Db Pgsql getRawSql params replace fix
yiisoft/yii2#18592

* styleci fix

* stub fix

* psalm fix
darkdef added a commit to yiisoft/db-pgsql that referenced this pull request Jan 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants