zvonimir-dd commented on code in PR #2641:
URL:
https://github.com/apache/datafusion-sqlparser-rs/pull/2641#discussion_r4429013881
##########
src/ast/trigger.rs:
##########
@@ -168,17 +168,18 @@ impl fmt::Display for TriggerExecBodyType {
pub struct TriggerExecBody {
/// Whether the body is a `FUNCTION` or `PROCEDURE` invocation.
pub exec_type: TriggerExecBodyType,
- /// Description of the function/procedure to execute.
- pub func_desc: FunctionDesc,
+ /// Name of the function/procedure to execute.
+ pub name: ObjectName,
+ /// Arguments passed to the function/procedure, if parenthesized.
+ pub args: Option<Vec<Expr>>,
Review Comment:
Small doc suggestion. PostgreSQL only accepts literals and bare names here,
and passes them all to the function as strings ("The arguments are literal
string constants. Simple names and numeric constants can be written here, too,
but they will all be converted to strings",
[docs](https://www.postgresql.org/docs/current/sql-createtrigger.html)). With
`Vec<Expr>`, a bare name like `audit` becomes `Expr::Identifier`, which
visitor-based tools may take for a column reference. `Expr` seems fine for this
crate, but it would help to say in the doc comment that these are trigger
arguments passed as strings, not evaluated expressions.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]