File tree Expand file tree Collapse file tree 2 files changed +12
-7
lines changed Expand file tree Collapse file tree 2 files changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -9870,13 +9870,7 @@ impl<'a> Parser<'a> {
9870
9870
}
9871
9871
9872
9872
fn parse_returns_table_column(&mut self) -> Result<ColumnDef, ParserError> {
9873
- let name = self.parse_identifier()?;
9874
- let data_type = self.parse_data_type()?;
9875
- Ok(ColumnDef {
9876
- name,
9877
- data_type,
9878
- options: Vec::new(), // No constraints expected here
9879
- })
9873
+ self.parse_column_def()
9880
9874
}
9881
9875
9882
9876
fn parse_returns_table_columns(&mut self) -> Result<Vec<ColumnDef>, ParserError> {
Original file line number Diff line number Diff line change @@ -327,6 +327,17 @@ fn parse_create_function() {
327
327
& create_multi_statement_table_value_function_without_as,
328
328
create_multi_statement_table_value_function,
329
329
) ;
330
+
331
+ let create_multi_statement_table_value_function_with_constraints = "\
332
+ CREATE FUNCTION some_multi_statement_tvf(@foo INT, @bar VARCHAR(256)) \
333
+ RETURNS @t TABLE (col_1 INT NOT NULL) \
334
+ AS \
335
+ BEGIN \
336
+ INSERT INTO @t SELECT 1; \
337
+ RETURN @t; \
338
+ END\
339
+ ";
340
+ let _ = ms ( ) . verified_stmt ( create_multi_statement_table_value_function_with_constraints) ;
330
341
}
331
342
332
343
#[ test]
You can’t perform that action at this time.
0 commit comments