@@ -44,12 +44,12 @@ use crate::ast::{
4444 ArgMode , AttachedToken , CommentDef , ConditionalStatements , CreateFunctionBody ,
4545 CreateFunctionUsing , CreateTableLikeKind , CreateTableOptions , CreateViewParams , DataType , Expr ,
4646 FileFormat , FunctionBehavior , FunctionCalledOnNull , FunctionDesc , FunctionDeterminismSpecifier ,
47- FunctionParallel , HiveDistributionStyle , HiveFormat , HiveIOFormat , HiveRowFormat ,
48- HiveSetLocation , Ident , InitializeKind , MySQLColumnPosition , ObjectName , OnCommit ,
49- OneOrManyWithParens , OperateFunctionArg , OrderByExpr , ProjectionSelect , Query , RefreshModeKind ,
50- RowAccessPolicy , SequenceOptions , Spanned , SqlOption , StorageSerializationPolicy , TableVersion ,
51- Tag , TriggerEvent , TriggerExecBody , TriggerObject , TriggerPeriod , TriggerReferencing , Value ,
52- ValueWithSpan , WrappedCollection ,
47+ FunctionParallel , FunctionSecurity , HiveDistributionStyle , HiveFormat , HiveIOFormat ,
48+ HiveRowFormat , HiveSetLocation , Ident , InitializeKind , MySQLColumnPosition , ObjectName ,
49+ OnCommit , OneOrManyWithParens , OperateFunctionArg , OrderByExpr , ProjectionSelect , Query ,
50+ RefreshModeKind , RowAccessPolicy , SequenceOptions , Spanned , SqlOption ,
51+ StorageSerializationPolicy , TableVersion , Tag , TriggerEvent , TriggerExecBody , TriggerObject ,
52+ TriggerPeriod , TriggerReferencing , Value , ValueWithSpan , WrappedCollection ,
5353} ;
5454use crate :: display_utils:: { DisplayCommaSeparated , Indent , NewLine , SpaceOrNewline } ;
5555use crate :: keywords:: Keyword ;
@@ -3217,6 +3217,10 @@ pub struct CreateFunction {
32173217 ///
32183218 /// [PostgreSQL](https://www.postgresql.org/docs/current/sql-createfunction.html)
32193219 pub parallel : Option < FunctionParallel > ,
3220+ /// SECURITY { DEFINER | INVOKER }
3221+ ///
3222+ /// [PostgreSQL](https://www.postgresql.org/docs/current/sql-createfunction.html)
3223+ pub security : Option < FunctionSecurity > ,
32203224 /// USING ... (Hive only)
32213225 pub using : Option < CreateFunctionUsing > ,
32223226 /// Language used in a UDF definition.
@@ -3283,6 +3287,9 @@ impl fmt::Display for CreateFunction {
32833287 if let Some ( parallel) = & self . parallel {
32843288 write ! ( f, " {parallel}" ) ?;
32853289 }
3290+ if let Some ( security) = & self . security {
3291+ write ! ( f, " {security}" ) ?;
3292+ }
32863293 if let Some ( remote_connection) = & self . remote_connection {
32873294 write ! ( f, " REMOTE WITH CONNECTION {remote_connection}" ) ?;
32883295 }
0 commit comments