-
Notifications
You must be signed in to change notification settings - Fork 594
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
sha family hash function errors when meetting '\' #13334
Comments
Thanks for reporting this. Let me take a look. |
The behavior is consistent with PostgresQL:
This is because
https://pgpedia.info/s/sha256.html example:
|
But convert |
There are two ways to input a bytea value of a single byte 0x5c (
More options if using conversion functions:
|
Is there a way to convert it in table so that I can use sha family hash? -- create table
create table test (
test varchar
);
-- insert data
insert into test values ('\=');
-- this will failed
-- ERROR: QueryError: Internal(Expr error: Parse error: invalid input syntax for type bytea)
select test::bytea from test;
select sha512(test::bytea) from test; |
|
Thanks, it worked for me. |
Describe the bug
When using sha family hash with input containing '', it will failed.
Error message/log
To Reproduce
Expected behavior
I expect sha family functions work well with ''.
Or support
convert_to
so we can convert the varchat to utf8 bytes.How did you deploy RisingWave?
via docker risingwave playground:
./bin/risingwave playground
The version of RisingWave
PostgreSQL 9.5-RisingWave-1.3.0 (unknown)
risingwavelabs/risingwave latest 11a43456396f 2 weeks ago 4.81GB
Additional context
No response
The text was updated successfully, but these errors were encountered: