Skip to content

Conversation

@aykut-bozkurt
Copy link
Member

@aykut-bozkurt aykut-bozkurt commented Apr 18, 2025

We did not cover the case where unprivileged user runs COPY FROM in our tests. COPY TO works well since we always convert relation to select statement, for which PG performs correct privilege checks during the copy. For COPY FROM, we need to perform these checks explicitly as done in DoCopy() at Postgres.

@aykut-bozkurt aykut-bozkurt added the bug Something isn't working label Apr 18, 2025
@aykut-bozkurt aykut-bozkurt force-pushed the aykut/fix-copy-from-privilege branch from 77ce119 to 9d6b3fb Compare April 18, 2025 11:11
@codecov
Copy link

codecov bot commented Apr 18, 2025

Codecov Report

Attention: Patch coverage is 92.77108% with 6 lines in your changes missing coverage. Please review.

Project coverage is 91.31%. Comparing base (29769de) to head (9d6b3fb).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/parquet_copy_hook/pg_compat.rs 90.00% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #125      +/-   ##
==========================================
- Coverage   91.34%   91.31%   -0.04%     
==========================================
  Files          91       91              
  Lines       13059    13140      +81     
==========================================
+ Hits        11929    11999      +70     
- Misses       1130     1141      +11     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Collaborator

@marcoslot marcoslot left a comment

Choose a reason for hiding this comment

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

Probably some more tests with things like CREATE POLICY would be good

@aykut-bozkurt
Copy link
Member Author

Probably some more tests with things like CREATE POLICY would be good

we already had pls tests for both copy from and copy to

@aykut-bozkurt aykut-bozkurt merged commit 3d8fbb6 into main Apr 18, 2025
5 of 6 checks passed
@aykut-bozkurt aykut-bozkurt deleted the aykut/fix-copy-from-privilege branch April 18, 2025 17:54
aykut-bozkurt added a commit that referenced this pull request Apr 18, 2025
(cherry picked from commit 3d8fbb6)
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.

3 participants