@@ -67,14 +67,15 @@ pub use self::ddl::{
6767 ColumnPolicyProperty , ConstraintCharacteristics , CreateConnector , CreateDomain ,
6868 CreateExtension , CreateFunction , CreateIndex , CreateOperator , CreateOperatorClass ,
6969 CreateOperatorFamily , CreateTable , CreateTrigger , CreateView , Deduplicate , DeferrableInitial ,
70- DropBehavior , DropExtension , DropFunction , DropTrigger , GeneratedAs , GeneratedExpressionMode ,
71- IdentityParameters , IdentityProperty , IdentityPropertyFormatKind , IdentityPropertyKind ,
72- IdentityPropertyOrder , IndexColumn , IndexOption , IndexType , KeyOrIndexDisplay , Msck ,
73- NullsDistinctOption , OperatorArgTypes , OperatorClassItem , OperatorPurpose , Owner , Partition ,
74- ProcedureParam , ReferentialAction , RenameTableNameKind , ReplicaIdentity , TagsColumnOption ,
75- TriggerObjectKind , Truncate , UserDefinedTypeCompositeAttributeDef ,
76- UserDefinedTypeInternalLength , UserDefinedTypeRangeOption , UserDefinedTypeRepresentation ,
77- UserDefinedTypeSqlDefinitionOption , UserDefinedTypeStorage , ViewColumnDef ,
70+ DropBehavior , DropExtension , DropFunction , DropOperator , DropOperatorSignature , DropTrigger ,
71+ GeneratedAs , GeneratedExpressionMode , IdentityParameters , IdentityProperty ,
72+ IdentityPropertyFormatKind , IdentityPropertyKind , IdentityPropertyOrder , IndexColumn ,
73+ IndexOption , IndexType , KeyOrIndexDisplay , Msck , NullsDistinctOption , OperatorArgTypes ,
74+ OperatorClassItem , OperatorPurpose , Owner , Partition , ProcedureParam , ReferentialAction ,
75+ RenameTableNameKind , ReplicaIdentity , TagsColumnOption , TriggerObjectKind , Truncate ,
76+ UserDefinedTypeCompositeAttributeDef , UserDefinedTypeInternalLength ,
77+ UserDefinedTypeRangeOption , UserDefinedTypeRepresentation , UserDefinedTypeSqlDefinitionOption ,
78+ UserDefinedTypeStorage , ViewColumnDef ,
7879} ;
7980pub use self :: dml:: { Copy , Delete , Insert , Update } ;
8081pub use self :: operator:: { BinaryOperator , UnaryOperator } ;
@@ -3560,6 +3561,12 @@ pub enum Statement {
35603561 /// <https://www.postgresql.org/docs/current/sql-dropextension.html>
35613562 DropExtension ( DropExtension ) ,
35623563 /// ```sql
3564+ /// DROP OPERATOR [ IF EXISTS ] name ( { left_type | NONE } , right_type ) [, ...] [ CASCADE | RESTRICT ]
3565+ /// ```
3566+ /// Note: this is a PostgreSQL-specific statement.
3567+ /// <https://www.postgresql.org/docs/current/sql-dropoperator.html>
3568+ DropOperator ( DropOperator ) ,
3569+ /// ```sql
35633570 /// FETCH
35643571 /// ```
35653572 /// Retrieve rows from a query using a cursor
@@ -4786,6 +4793,7 @@ impl fmt::Display for Statement {
47864793 Statement :: CreateIndex ( create_index) => create_index. fmt ( f) ,
47874794 Statement :: CreateExtension ( create_extension) => write ! ( f, "{create_extension}" ) ,
47884795 Statement :: DropExtension ( drop_extension) => write ! ( f, "{drop_extension}" ) ,
4796+ Statement :: DropOperator ( drop_operator) => write ! ( f, "{drop_operator}" ) ,
47894797 Statement :: CreateRole ( create_role) => write ! ( f, "{create_role}" ) ,
47904798 Statement :: CreateSecret {
47914799 or_replace,
@@ -9050,7 +9058,20 @@ pub enum CreateFunctionBody {
90509058 /// ```
90519059 ///
90529060 /// [BigQuery]: https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#syntax_11
9053- AsBeforeOptions ( Expr ) ,
9061+ /// [PostgreSQL]: https://www.postgresql.org/docs/current/sql-createfunction.html
9062+ AsBeforeOptions {
9063+ /// The primary expression.
9064+ body : Expr ,
9065+ /// Link symbol if the primary expression contains the name of shared library file.
9066+ ///
9067+ /// Example:
9068+ /// ```sql
9069+ /// CREATE FUNCTION cas_in(input cstring) RETURNS cas
9070+ /// AS 'MODULE_PATHNAME', 'cas_in_wrapper'
9071+ /// ```
9072+ /// [PostgreSQL]: https://www.postgresql.org/docs/current/sql-createfunction.html
9073+ link_symbol : Option < Expr > ,
9074+ } ,
90549075 /// A function body expression using the 'AS' keyword and shows up
90559076 /// after any `OPTIONS` clause.
90569077 ///
0 commit comments