Skip to content

Conversation

JelteF
Copy link
Collaborator

@JelteF JelteF commented Jan 28, 2025

Without this change it's impossible to reference two Postgres tables in the same query that only differ in casing. This fixes that by not using a case_insentive_map to track the Postgres table and schema names. While this doesn't completely fix all issues caused by case insentivity mismatch between Postgres and DuckDB it does fix the major one described in #116.

Fixes #116

Without this change it's impossible to reference two Postgres tables in
the same query that only differ in casing. This fixes that by not using
a `case_insentive_map` to track the Postgres table and schema names.

Fixes #116
@JelteF JelteF added this to the 0.3.0 milestone Jan 28, 2025
@JelteF JelteF added the bug Something isn't working label Jan 28, 2025
Copy link
Collaborator

@Y-- Y-- left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add a test?

@JelteF
Copy link
Collaborator Author

JelteF commented Jan 28, 2025

Ugh yes... I forgot the git add...

@Y--
Copy link
Collaborator

Y-- commented Jan 29, 2025

Ugh yes... I forgot the git add...

Git is hard 😆

Copy link
Collaborator

@Y-- Y-- left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks

@Y-- Y-- merged commit 83b7de4 into main Jan 29, 2025
5 checks passed
@Y-- Y-- deleted the fix-case-insensitive branch January 29, 2025 07:50
JelteF added a commit that referenced this pull request Jan 29, 2025
With the `read_parquet` syntax from before #531 we had a bug where it
was impossible to change casing of an alias from upper to lower:

```
select upper as "upper", lower as "LOWER" from read_parquet('/tmp/tmp.parquet') as t(upper int8, lower int8) limit 2;

 UPPER | LOWER
-------+-------
     0 |     0
     1 |     1
(2 rows)
```

See #564 for more details.

Luckily #531 has completely fixed this problem, so all this PR does is add
some regression tests.

Finally it also corrects the output file of the `case_insensitivity.sql`
test, which was introduced by #563. It also adds that test to the
`schedule` file, which was the reason that CI didn't notice that the
output was wrong.

Fixes #564
Related #563
JelteF added a commit that referenced this pull request Feb 3, 2025
With the `read_parquet` syntax from before #531 we had a bug where it
was impossible to change casing of an alias from upper to lower:

```
select upper as "upper", lower as "LOWER" from read_parquet('/tmp/tmp.parquet') as t(upper int8, lower int8) limit 2;

 UPPER | LOWER
-------+-------
     0 |     0
     1 |     1
(2 rows)
```

See #564 for more details.

Luckily #531 has completely fixed this problem, so all this PR does is
add some regression tests.

Finally it also corrects the output file of the `case_insensitivity.sql`
test, which was introduced by #563. It also adds that test to the
`schedule` file, which was the reason that CI didn't notice that the
output was wrong.

Fixes #564
Related #563
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Case insensitivity mismatch between duckdb and postgres can cause issues
2 participants