-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
sql: add getdatabaseencoding() function #41771
Comments
Are there any recommendations on where to start and references if someone is interested in this? |
|
It looks like this information is stored in the database Let me know if you have any questions! |
For reference, here are the encodings that Postgres uses:
This enum is referenced from https://github.com/postgres/postgres/blob/8e10405c745003c5c16acb2da847db9bed1a169e/src/backend/utils/mb/mbutils.c#L1048 |
Hey - I am new to OSS contribution. Can I work on this if no one else is attempting? |
Sure, it doesn't look like whoever asked before is still working on this! |
Hey, I thought I try to create a PR for this, but somehow I run into a stalling issue with my code and I can't find out why. Does anyone has a hint for me? When I call the function the query never ends and just stalls the whole system.
|
You can't call |
hi, I have implemented ,
thorw this i was able to provide query for database, I have tested it locally it working fine |
If you think you have a working solution, please open a PR! We can review it there. |
Thanks |
@rohany oh man, can't believe I didn't get that it's calling itself (fiddled around for hours). Have to read up more about the architecture, sad that it's already solved now |
Resolves cockroachdb#41771. This commit adds builtin function, getdatabaseencoding(), and the unit-test case for it. Release note (sql change): This PR is introduced to add builtin function, getdatabaseencoding(), which returns the current encoding name used by the database.
Resolves cockroachdb#41771. This commit adds builtin function, getdatabaseencoding(), and the unit-test case for it. Release note (sql change): This PR is introduced to add builtin function, getdatabaseencoding(), which returns the current encoding name used by the database.
Resolves cockroachdb#41771. This commit apply following changes. * This commit adds builtin function, getdatabaseencoding(). * Created a helper function getEncodingNameForEncodingID which returns the Encoding name for a given Encoding ID. * Modified defination of pg_encoding_to_char(). Release note (sql change): This PR is introduced to add builtin function, getdatabaseencoding(), which returns the current encoding name used by the database.
45129: sql: add the getdatabaseencoding() builtin function r=otan a=abhishek20123g Resolves #41771. This commit adds builtin function, getdatabaseencoding(), and the unit-test case for it. Release note (sql change): This PR is introduced to add builtin function, getdatabaseencoding(), which returns the current encoding name used by the database. Co-authored-by: abhishek20123g <[email protected]>
Postgres has a
getdatabaseencoding()
function that we should support.The text was updated successfully, but these errors were encountered: