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

Fix parsing of record codecs that have attributes with castFromPg #1988

Merged
merged 11 commits into from
Mar 13, 2024
Merged

Conversation

benjie
Copy link
Member

@benjie benjie commented Mar 13, 2024

Description

Fixes #1987. Essentially it wasn't safe to do record::text if any of the codecs of the attributes of the record used castFromPg because their fromPg methods would be expecting the cast version of the data, not the raw data. Solution was to check for castFromPg on each attribute and then cast the entire expression if one existed.

Performance impact

Yikes.

Security impact

Improvement?

Checklist

  • My code matches the project's code style and yarn lint:fix passes.
  • I've added tests for the new feature, and yarn test passes.
  • I have detailed the new feature in the relevant documentation.
  • I have added this feature to 'Pending' in the RELEASE_NOTES.md file (if one exists).
  • If this is a breaking change I've explained why.

Copy link

changeset-bot bot commented Mar 13, 2024

🦋 Changeset detected

Latest commit: 8f525f4

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

This PR includes changesets to release 6 packages
Name Type
postgraphile Patch
@dataplan/pg Patch
graphile-utils Patch
pgl Patch
graphile Patch
graphile-build-pg 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

@benjie benjie merged commit 7b08ea3 into main Mar 13, 2024
24 checks passed
@benjie benjie deleted the tsrange branch March 13, 2024 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Postgraphile computed column fails with tsrange and additional parameters
1 participant