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

pgsql: incorrect parameter replacement in metaColumns() #974

Open
dregad opened this issue May 21, 2023 · 0 comments · May be fixed by #1008
Open

pgsql: incorrect parameter replacement in metaColumns() #974

dregad opened this issue May 21, 2023 · 0 comments · May be fixed by #1008
Assignees
Labels
bug pgsql PostgreSQL (Tier 1)
Milestone

Comments

@dregad
Copy link
Member

dregad commented May 21, 2023

Regression introduced in 5.20.0 by f54e496

When the _generateMetaColumnsSQL() protected method was introduced, the original sprintf() statement was not correctly copied into the new function:

// The original code in MetaColumns() function
-sprintf($this->metaColumnsSQL,$table,$table,$table)
// became this in _generateMetaColumnsSQL()
+sprintf($this->metaColumnsSQL, $table, $table, $schema)

This causes an incorrect where clause to be applied to the query (the table name is compared to the lowercase schema name).

Will be fixed as part of PostgreSQL driver refactoring #955.

@dregad dregad added bug pgsql PostgreSQL (Tier 1) labels May 21, 2023
@dregad dregad added this to the v5.23.0 milestone May 21, 2023
@dregad dregad self-assigned this May 21, 2023
@dregad dregad linked a pull request Nov 5, 2023 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug pgsql PostgreSQL (Tier 1)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant