You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "waterWang (via GitHub)" <gi...@apache.org> on 2026/08/12 04:26:24 UTC
[PR] fix: add SYSTEM_USER to PostgreSQL unparenthesized function names [FaaFyfxR9WAQrL7FcAgEHJvztd8cVMxvjHRS55rw1nwH] [shardingsphere]
waterWang opened a new pull request, #39418:
URL: https://github.com/apache/shardingsphere/pull/39418
Fixes #39384
## Changes
Added `SYSTEM_USER` to `PostgreSQLFunctionOption.UNPARENTHESIZED_FUNCTION_NAMES` so that the PostgreSQL dialect correctly binds the niladic function `SYSTEM_USER` instead of misclassifying it as a column reference.
## Root Cause
`PostgreSQLFunctionOption` (line 31-33) lists 11 unparenthesized function names and omits `SYSTEM_USER`. `ColumnSegmentBinder.isUnparenthesizedFunction()` reads this set via `.contains()` to decide function vs column. When the lookup fails, `bind()` throws `ColumnNotFoundException`.
`MySQLFunctionOption` and `SQLServerFunctionOption` already include `SYSTEM_USER`.
## Verification
- `SELECT SYSTEM_USER` against a PostgreSQL-typed schema now correctly binds as a niladic function
- No grammar change required (SYSTEM_USER already lexes as an identifier in PostgreSQL)
- openGauss inherits this change via `OpenGaussDatabaseMetaData` which returns `new PostgreSQLFunctionOption()`
Signed-off-by: waterWang <wa...@users.noreply.github.com>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix: add SYSTEM_USER to PostgreSQL unparenthesized function names [FaaFyfxR9WAQrL7FcAgEHJvztd8cVMxvjHRS55rw1nwH] [shardingsphere]
Posted by "terrymanu (via GitHub)" <gi...@apache.org>.
terrymanu closed pull request #39418: fix: add SYSTEM_USER to PostgreSQL unparenthesized function names [FaaFyfxR9WAQrL7FcAgEHJvztd8cVMxvjHRS55rw1nwH]
URL: https://github.com/apache/shardingsphere/pull/39418
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix: add SYSTEM_USER to PostgreSQL unparenthesized function names [FaaFyfxR9WAQrL7FcAgEHJvztd8cVMxvjHRS55rw1nwH] [shardingsphere]
Posted by "terrymanu (via GitHub)" <gi...@apache.org>.
terrymanu commented on PR #39418:
URL: https://github.com/apache/shardingsphere/pull/39418#issuecomment-6228693219
Thank you for your contribution. Since there has been no follow-up to the review feedback for over two months, I’m closing this PR for now. If you’d like to continue, please address the feedback and submit an updated PR. We’d be happy to review it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org