Typo in pg_stat_activity definition
I noticed an inconsistency between uppercase and lowercase letters in only
one place of pg_stat_activity definition, so I'll report it. I think this
is just a typo and there is no functionality issue.
When I compared to the content before and after, I think the capital letter
"S" than "s" is suitable for alias, as shown below.
```diff
diff --git a/src/backend/catalog/system_views.sql
b/src/backend/catalog/system_views.sql
index 08f780a2e63..e5dbbe61b81 100644
--- a/src/backend/catalog/system_views.sql
+++ b/src/backend/catalog/system_views.sql
@@ -895,7 +895,7 @@ CREATE VIEW pg_stat_activity AS
S.wait_event,
S.state,
S.backend_xid,
- s.backend_xmin,
+ S.backend_xmin,
S.query_id,
S.query,
S.backend_type
```
Regards
Attachments:
typo.patchapplication/x-patch; name=typo.patchDownload+1-1
On Mon, Jun 30, 2025 at 01:44:58PM +0900, Daisuke Higuchi wrote:
I noticed an inconsistency between uppercase and lowercase letters in only
one place of pg_stat_activity definition, so I'll report it. I think this
is just a typo and there is no functionality issue.
When I compared to the content before and after, I think the capital letter
"S" than "s" is suitable for alias, as shown below.
Yeah, makes sense to me to fix this inconsistency on HEAD, even if
it's benign. One thing that you are forgetting is that the regression
tests are going to fail: rules.out reports the definition of
pg_stat_activity, and the characters casing matters in this case.
Note that the new development cycle has officially begin, so that
would touch only v19.
--
Michael
Michael Paquier <michael@paquier.xyz> writes:
On Mon, Jun 30, 2025 at 01:44:58PM +0900, Daisuke Higuchi wrote:
When I compared to the content before and after, I think the capital letter
"S" than "s" is suitable for alias, as shown below.
Yeah, makes sense to me to fix this inconsistency on HEAD, even if
it's benign.
Yeah, it's purely cosmetic. But +1 for consistency.
One thing that you are forgetting is that the regression
tests are going to fail: rules.out reports the definition of
pg_stat_activity, and the characters casing matters in this case.
I doubt it --- the regression tests will show deparsing results,
which shouldn't change.
Note that the new development cycle has officially begin, so that
would touch only v19.
Since it's only cosmetic, I can't see much argument for back-patching.
regards, tom lane
Thank you for comments!
One thing that you are forgetting is that the regression
tests are going to fail: rules.out reports the definition of
pg_stat_activity, and the characters casing matters in this case.I doubt it --- the regression tests will show deparsing results,
which shouldn't change.
Yes, applying this patch will not cause the 'rules' test to fail.
Even if the pg_stat_activity view definition information in
system_views.sql is capitalized (inconsistency is fixed) by this patch, it
will be lowercase when this view is installed in database. So, the test
result does not change.
Just to be sure, I ran the 'make check' and 'make check-world', and I
confirmed that all tests were passed.
Regards.
On Mon, Jun 30, 2025 at 04:03:01PM +0900, Daisuke Higuchi wrote:
Yes, applying this patch will not cause the 'rules' test to fail.
Even if the pg_stat_activity view definition information in
system_views.sql is capitalized (inconsistency is fixed) by this patch, it
will be lowercase when this view is installed in database. So, the test
result does not change.
Yes, that was the part where I need to learn to read my greps more
correctly. Applied as-is on HEAD.
--
Michael