MCPcopy Create free account
hub / github.com/PostHog/duckgres / alterColumnTypeHasUsingExpression

Function alterColumnTypeHasUsingExpression

transpiler/transform/ddl.go:446–454  ·  view source on GitHub ↗
(cmd *pg_query.AlterTableCmd)

Source from the content-addressed store, hash-verified

444}
445
446func alterColumnTypeHasUsingExpression(cmd *pg_query.AlterTableCmd) bool {
447 if cmd == nil || cmd.Subtype != pg_query.AlterTableType_AT_AlterColumnType {
448 return false
449 }
450 def := cmd.Def.GetColumnDef()
451 // pg_query stores ALTER COLUMN TYPE ... USING <expr> on ColumnDef.RawDefault
452 // for AT_AlterColumnType commands.
453 return def != nil && def.RawDefault != nil
454}
455
456// isUnsupportedAlterCommand checks if an ALTER TABLE command is unsupported by DuckLake
457func (t *DDLTransform) isUnsupportedAlterCommand(cmd *pg_query.AlterTableCmd) bool {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected