Skip to content

Commit c547946

Browse files
- Added robot test Insert Returning Simple Projection.
1 parent 32e4d76 commit c547946

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

internal/stackql/parserutil/parser_util.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,10 @@ func ExtractSelectColumnNames(selStmt *sqlparser.Select, formatter sqlparser.Nod
8888
return colNames, err
8989
}
9090

91-
func ExtractInsertReturningColumnNames(insertStmt *sqlparser.Insert, formatter sqlparser.NodeFormatter) ([]ColumnHandle, error) {
91+
func ExtractInsertReturningColumnNames(
92+
insertStmt *sqlparser.Insert,
93+
formatter sqlparser.NodeFormatter,
94+
) ([]ColumnHandle, error) {
9295
var colNames []ColumnHandle
9396
var err error
9497
for _, node := range insertStmt.SelectExprs {

internal/stackql/primitivegenerator/statement_analyzer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1002,7 +1002,7 @@ func (pb *standardPrimitiveGenerator) buildRequestContext(
10021002
return err
10031003
}
10041004

1005-
//nolint:gocognit,funlen // TODO: review
1005+
//nolint:gocognit,funlen,gocyclo,cyclop // TODO: review
10061006
func (pb *standardPrimitiveGenerator) AnalyzeInsert(pbi planbuilderinput.PlanBuilderInput) error {
10071007
handlerCtx := pbi.GetHandlerCtx()
10081008
annotatedAST := pbi.GetAnnotatedAST()

internal/stackql/sql_system/postgres.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1237,7 +1237,7 @@ func (eng *postgresSystem) generateSelectDML(
12371237
quotedColNames,
12381238
", ",
12391239
),
1240-
eng.tableCatalog,
1240+
eng.tableSchema,
12411241
tableName,
12421242
aliasStr,
12431243
),

0 commit comments

Comments
 (0)