iffyio commented on code in PR #2217:
URL: 
https://github.com/apache/datafusion-sqlparser-rs/pull/2217#discussion_r2827748101


##########
src/ast/data_type.rs:
##########
@@ -61,6 +61,11 @@ pub enum DataType {
         /// Table columns.
         columns: Vec<ColumnDef>,
     },
+    /// SETOF type modifier for [PostgreSQL] function return types,
+    /// e.g. `CREATE FUNCTION ... RETURNS SETOF text`.
+    ///
+    /// [PostgreSQL]: 
https://www.postgresql.org/docs/current/sql-createfunction.html
+    SetOf(Box<DataType>),

Review Comment:
   would it make sense to represent this as a qualifier around the return type 
of a function instead? e.g.
   
   ```rust
   enum FunctionReturnType {
       DataType(DataType),
       Setof(DataType)
   }
   CreateFunction { ... return_type: FunctionReturnType ... }
   ```
   Thinking that would probably be better because it would be a bit confusing 
having a `SETOF` `DataType` that isn't a valid data type in any dialect



-- 
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]

Reply via email to