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

Add EmitWarningsOnPlaceholders("age") #1997

Merged

Conversation

shinyaaa
Copy link
Contributor

@shinyaaa shinyaaa commented Aug 1, 2024

Added EmitWarningsOnPlaceholders("age") to warn when an undefined GUC parameter is set for a placeholder named "age".

Warnings are issued when PostgreSQL starts and when SET statements are executed.

When PostgreSQL starts

2024-08-01 18:32:31.220 JST [2039799] WARNING: invalid configuration parameter name "age.invalid_parameter", removing it

When SET statement is executed

ERROR: invalid configuration parameter name "age.invalid_parameter"
DETAIL: "age" is a reserved prefix.

Regression tests were added.

@jrgemignani
Copy link
Contributor

@shinyaaa Please add in regression tests to show this works :)

Copy link
Contributor

@jrgemignani jrgemignani left a comment

Choose a reason for hiding this comment

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

You need regression tests

@shinyaaa shinyaaa force-pushed the add-emit-warnings-on-placeholders branch 3 times, most recently from eb403e7 to a01b8cb Compare August 2, 2024 12:30
@shinyaaa
Copy link
Contributor Author

shinyaaa commented Aug 2, 2024

Thanks for the review.
I don't know if this is the right file to add the test to, but I have added it.

@rafsun42
Copy link
Member

rafsun42 commented Aug 2, 2024

@shinyaaa Overall looks good. Before it can be merged, could you please add detailed commit message as well?

@shinyaaa shinyaaa changed the title Add EmitWarningsOnPlaceholders() Add EmitWarningsOnPlaceholders("age") Aug 5, 2024
@shinyaaa
Copy link
Contributor Author

shinyaaa commented Aug 5, 2024

Thank you!

I've set up a commit message.
#1997 (comment)

And the same goes for other PRs.

@rafsun42
Copy link
Member

rafsun42 commented Aug 6, 2024

Hi @shinyaaa, your commit message is applied to the PR in GitHub rather than the commit. To clarify, I meant adding extended commit message after you run the git commit command.

Added EmitWarningsOnPlaceholders("age") to warn when an undefined GUC parameter is set for a placeholder named "age".
Warnings are issued when PostgreSQL starts and when SET statements are executed.

When PostgreSQL starts
```
2024-08-01 18:32:31.220 JST [2039799] WARNING: invalid configuration parameter name "age.invalid_parameter", removing it
```

When SET statement is executed
```
ERROR: invalid configuration parameter name "age.invalid_parameter"
DETAIL: "age" is a reserved prefix.
```

Regression tests were added.
@shinyaaa shinyaaa force-pushed the add-emit-warnings-on-placeholders branch from a01b8cb to bb83865 Compare August 7, 2024 01:17
@shinyaaa
Copy link
Contributor Author

shinyaaa commented Aug 7, 2024

Added the commit message, and rebased.

@jrgemignani jrgemignani merged commit 53999d2 into apache:master Aug 7, 2024
7 checks passed
@rafsun42
Copy link
Member

rafsun42 commented Aug 8, 2024

@shinyaaa Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants