Skip to content

Conversation

@dabla
Copy link
Contributor

@dabla dabla commented Aug 22, 2025

PostgresDialect should use index instead of name in get_primary_keys as returned rows are list of tuples, not list of dicts in Postgres. For the get_column_names, the method schould map the rertuned tuples in a dict which respects the same format as SQLAlchemy uses so it's cross dialect compatible weather the native implementation is used or the SQLAlchemy one.


^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in airflow-core/newsfragments.

@dabla dabla marked this pull request as draft August 22, 2025 12:50
@dabla dabla marked this pull request as ready for review August 22, 2025 14:56
@potiuk potiuk merged commit 2f58d76 into apache:main Aug 22, 2025
103 of 111 checks passed
@dabla
Copy link
Contributor Author

dabla commented Aug 22, 2025

Thx @potiuk

mangal-vairalkar pushed a commit to mangal-vairalkar/airflow that referenced this pull request Aug 30, 2025
…and get_primary_keys (apache#54832)

* fix: PostgresDialect should use index instead of name as returned rows are list of tuples, not list of dicts

* refactor: Updated TestPostgresDialect

* Revert "refactor: Updated TestPostgresDialect"

This reverts commit 244b889.

* refactor: Refactored get_column_names in PostgresDialect so it allows back filtering through predicate

* refactor: Also take into account autoincrement columns in PostgresDialect

* refactor: Fixed mocking of records in TestPostgresDialect

* refactor: Reformatted get_column_names
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants