Skip to content

Conversation

rkistner
Copy link
Contributor

For queries such as SELECT * FROM assets WHERE userId = bucket.userId, both instances of userId are converted to a lower-case userid. This is standard behavior in Postgres SQL, and common in other SQL variations as well. However, it is often unexpected for developers, causing difficult-to-debug issues.

This adds a warning when an unquoted identifier is used that is not all lower-case. We don't get enough info to properly split schema name, table name and table alias, so the check does nothing for now if a schema name or table alias is encountered.

The check is especially relevant when schema information is not available for validations.

image

@changeset-bot
Copy link

changeset-bot bot commented Sep 25, 2024

🦋 Changeset detected

Latest commit: 9e78ff1

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
@powersync/service-sync-rules Minor
@powersync/service-core Patch
@powersync/service-image Patch
test-client Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@rkistner rkistner merged commit b5d9156 into main Sep 25, 2024
8 checks passed
@rkistner rkistner deleted the check-ref-case branch September 25, 2024 12:05
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.

2 participants