Pgp encrypt decrypt functions #24117
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
This PR introduces the foundational infrastructure and stub implementations for PostgreSQL-compatible PGP encryption and decryption functions:
pgp_sym_encrypt,pgp_sym_decrypt,pgp_pub_encrypt, andpgp_pub_decrypt.The intention is to lay the groundwork for a full implementation of these functions, ensuring compatibility with
pgcryptoas per the PostgreSQL documentation. This initial PR focuses on integrating the function signatures into RisingWave's expression system.Changes include:
ExprNodetypes for the PGP functions inproto/expr.proto.src/expr/impl/src/scalar/pgp_encrypt.rsto house these functions.ExprError::InvalidParamindicating that the functionality is "not yet implemented".pgp_encryptmodule.src/frontend/src/expr/pure.rsandsrc/frontend/src/optimizer/plan_expr_visitor/strong.rs) to recognize these new function types.This PR enables the system to parse and recognize the PGP function calls, allowing for incremental development of the actual cryptographic logic in subsequent PRs.
Limitations:
The functions currently only return an error message and do not perform any actual PGP encryption or decryption.
Checklist
Documentation
Release note