Skip to content

Commit ce4b7b2

Browse files
committed
workload/schemachange: fix error code for unknown type
There is another error that can occur when creating a table with an unknown type, so this commit teaches the workload to handle it. Release note: None
1 parent 22f815b commit ce4b7b2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pkg/workload/schemachange/operation_generator.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1319,10 +1319,13 @@ func (og *operationGenerator) createTable(ctx context.Context, tx pgx.Tx) (*opSt
13191319
opStmt.potentialExecErrors.addAll(codesWithConditions{
13201320
{code: pgcode.Syntax, condition: hasVectorType},
13211321
{code: pgcode.FeatureNotSupported, condition: hasVectorType},
1322+
{code: pgcode.UndefinedObject, condition: hasVectorType},
13221323
{code: pgcode.Syntax, condition: hasCitextType},
13231324
{code: pgcode.FeatureNotSupported, condition: hasCitextType},
1325+
{code: pgcode.UndefinedObject, condition: hasCitextType},
13241326
{code: pgcode.Syntax, condition: hasLtreeType},
13251327
{code: pgcode.FeatureNotSupported, condition: hasLtreeType},
1328+
{code: pgcode.UndefinedObject, condition: hasLtreeType},
13261329
})
13271330
opStmt.sql = tree.Serialize(stmt)
13281331
return opStmt, nil

0 commit comments

Comments
 (0)