-
-
Notifications
You must be signed in to change notification settings - Fork 414
Fixing issues with PostgreSQL #3289
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
base: general-devel
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
| @@ -1,4 +1,4 @@ | ||||||||
| /* | ||||||||
| /* | ||||||||
| TShock, a server mod for Terraria | ||||||||
| Copyright (C) 2011-2025 Pryaxis & TShock Contributors | ||||||||
|
|
||||||||
|
|
@@ -94,6 +94,9 @@ public override string DbTypeToString(MySqlDbType type, int? length) | |||||||
| throw new NotImplementedException(Enum.GetName(typeof(MySqlDbType), type)); | ||||||||
| } | ||||||||
|
|
||||||||
| /// <inheritdoc /> | ||||||||
| protected override string EscapeColumnName(string column) => $"\'{column}\'"; | ||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
In SQL, single quotes denote string literals, not identifiers. When
Suggested change
|
||||||||
|
|
||||||||
| /// <summary> | ||||||||
| /// Escapes the table name | ||||||||
| /// </summary> | ||||||||
|
|
||||||||
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.
RETURNINGclause should quoteTicketNumberconsistently with howPostgresQueryBuilder.EscapeColumnNamestores the column (lowercased, double-quoted). While PostgreSQL folds unquotedTicketNumbertoticketnumberat runtime and the match succeeds today, using the same quoting convention eliminates the silent dependency on case-folding.