-
Notifications
You must be signed in to change notification settings - Fork 410
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
Allow database name contain uppercase characters #2504
Conversation
Checking tests here because my computer dies on |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #2504 +/- ##
==========================================
+ Coverage 26.75% 26.78% +0.02%
==========================================
Files 403 403
Lines 19976 19976
==========================================
+ Hits 5345 5350 +5
+ Misses 14065 14061 -4
+ Partials 566 565 -1
... and 2 files with indirect coverage changes
Flags with carried forward coverage won't be shown. Click here to find out more. |
Hey! sql = `
SELECT
SUM(pg_total_relation_size(quote_ident(schemaname) || '.' || quote_ident(tablename)))
FROM pg_tables
WHERE schemaname = $1`
args := []any{pgx.Identifier{db}.Sanitize()} The second one is on line 165: WHERE oid = '%s'::regclass`,
pgx.Identifier{db, metadata.table}.Sanitize(), Could you please fix those 2 places? |
@w84thesun, yeah sure! But what about other places like: FerretDB/internal/handlers/pg/pgdb/stats.go Line 178 in e44c4d3
FerretDB/internal/handlers/pg/pgdb/stats.go Line 122 in e44c4d3
|
Head branch was pushed to by a user without write access
Thanks for noticing and handling those places! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
I am not sure why pg tests fails...
I am kinda confused looking at this logs as both CreateDatabaseIfNotExists and DropDatabase in https://github.com/FerretDB/FerretDB/blob/main/internal/handlers/pg/pgdb/databases.go both sanitize db names. |
I'll take a look at it today. |
a5d1b8e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks for help! |
@syasyayas we thank you for your valuable contribution to FerretDB! |
Description
Closes #2451.
Readiness checklist
task all
, and it passed.@FerretDB/core
), Labels, Project and project's Sprint fields.