Skip to content

PostgreSQL: Escape quotes in COMMENT ON values - #2783

Open
LucaCappelletti94 wants to merge 1 commit into
mainfrom
comment-on-escape-quotes
Open

LucaCappelletti94 wants to merge 1 commit into
mainfrom
comment-on-escape-quotes

Conversation

@LucaCappelletti94

Copy link
Copy Markdown
Contributor

COMMENT ON COLUMN t.id IS 'Column ''id'' on t' rendered as COMMENT ON COLUMN t.id IS 'Column 'id' on t', which does not parse. The value is now printed through escape_single_quote_string. Hopefully there are not many of these still in the codebase, I am trying to find the last ones. Of course, there is an argument to turn escape_single_quote_string to a write_escape_single_quote_string to avoid the allocation, but I will tackle that separately.

https://www.postgresql.org/docs/current/sql-comment.html

@LucaCappelletti94 LucaCappelletti94 added bug Something isn't working fuzzer A bug found by the fuzzer PostgreSQL labels Oct 31, 2026
@codecov-commenter

codecov-commenter commented Oct 31, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.87%. Comparing base (7812d86) to head (ac2060c).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2783   +/-   ##
=======================================
  Coverage   82.87%   82.87%           
=======================================
  Files          42       42           
  Lines       35968    35968           
  Branches    35968    35968           
=======================================
  Hits        29807    29807           
  Misses       2654     2654           
  Partials     3507     3507           

☔ View full report in Codecov by Harness.
📢 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working fuzzer A bug found by the fuzzer PostgreSQL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants