## Code Analysis ### The catalog advertises a default but does not expose its expression `server/tables/pgcatalog/pg_attribute.go:120-132` ```go hasDefault := col.Default != nil attr := &pgAttribute{ attname: col.Name, attnotnull: !col.Nullable, atthasdef: hasDefault, } ``` The catalog sets `atthasdef` from the presence of `col.Default`, so a column with `DEFAULT 9` is reported as having a default. `server/tables/pgcatalog/pg_attrdef.go:103-118` ```go // TODO: Implement adbin when pg_node_tree exists return sql.Row{ col.OID.AsId(), // oid tableOid, // adrelid int16(col.Item.ColumnIndex + 1), // adnum nil, // adbin }, nil ``` The `pg_attrdef` row iterator unconditionally returns `nil` for `adbin`, so the stored default expression is not exposed through this catalog row. `server/functions/pg_get_expr.go:32-52` ```go // TODO: Implement this when the pg_node_tree type exists return nil, errors.Errorf("pg_get_expr is not yet supported") ``` Both registered `pg_get_expr` overloads return the unsupported error instead of converting a catalog default expression to text. Together, these paths explain how `atthasdef=true` can coexist with an empty catalog expression. ### Observed catalog readback The test created a named default and queried the relevant PostgreSQL-compatible catalogs: ```sql DROP TABLE IF EXISTS catalog_named; CREATE TABLE catalog_named ( nn_col integer CONSTRAINT named_nn NOT NULL, default_col integer CONSTRAINT named_default DEFAULT 9, unique_col integer CONSTRAINT named_unique UNIQUE ); ``` The captured catalog output showed the default flag but no expression: ```text pg_attribute: attname | attnotnull | atthasdef -------------+------------+----------- nn_col | t | f default_col | f | t unique_col | f | f pg_attrdef via pg_get_expr: attname | default_expr -------------+-------------- default_col | (null) ``` Raw `pg_attrdef` readback also returned an empty `adbin` and empty `pg_get_expr` result. PostgreSQL-compatible behavior for `DEFAULT 9` requires the expression to read back as `9`; the observed result therefore supports the reported catalog metadata failure. ### Result The executed catalog comparison failed for the named default: `atthasdef` was true, but the corresponding default expression was empty instead of `9`. The source excerpts identify the unconditional `nil` `adbin` value and unsupported `pg_get_expr` implementation as the production-code path behind the observed result. ### Test context The other named constraint checks in the same comparison, including the unique constraint and not-null metadata, matched their expected forms.