## Code Analysis ### Quoted commas are handled by the lookup parser `server/functions/regprocedure.go:165-215` ```go func regprocedure_Split(input string) (name string, args []string, err error) { leftParen := -1 inQuotes := false for i, char := range input { if char == '"' { inQuotes = !inQuotes } else if char == '(' && !inQuotes { leftParen = i break } } // ... case ',': if depth == 0 { args = append(args, strings.TrimSpace(argList[argStart:i])) argStart = i + 1 } // ... return input[:leftParen], append(args, lastArg), nil } ``` The parser tracks double-quoted text before treating a comma as an argument delimiter. This is the source path intended to preserve `"Type,WithComma"` as one type name when resolving a regprocedure. ### The observed internal error is emitted by a table lookup hook `server/hook/table_add_column.go:48-69` ```go allTableNames, err := root.GetAllTableNames(ctx, false) if err != nil { return nil, err } for _, otherTableName := range allTableNames { otherTable, ok, err := root.GetTable(ctx, otherTableName) if err != nil { return nil, err } if !ok { return nil, errors.Errorf("root returned table name `%s` but it could not be found?", otherTableName.String()) } } ``` This hook returns the same root/table lookup error family captured during the quoted composite-type function-creation path. The runtime error shows the comma-containing signature represented as `f_quoted(Type,WithComma)`, so the quoted identifier was not preserved as one name before this catalog-state update path failed. ## Observed execution ### function creation and lookup SQL ```sql CREATE SCHEMA rev6_retry; CREATE TYPE rev6_retry."Type,WithComma" AS (value integer); CREATE FUNCTION rev6_retry.f_array(integer[]) RETURNS integer LANGUAGE SQL IMMUTABLE AS $$ SELECT coalesce(array_length($1, 1), 0) $$; CREATE FUNCTION rev6_retry.f_nested(integer[][]) RETURNS integer LANGUAGE SQL IMMUTABLE AS $$ SELECT 1 $$; CREATE FUNCTION rev6_retry.f_quoted(rev6_retry."Type,WithComma") RETURNS integer LANGUAGE SQL IMMUTABLE AS $$ SELECT 1 $$; SELECT 'quoted' AS case_name, to_regprocedure('rev6_retry.f_quoted(rev6_retry."Type,WithComma")')::text AS resolved; ``` ### raw result ```text CREATE SCHEMA CREATE TYPE CREATE FUNCTION CREATE FUNCTION ERROR: root returned table `rev6_retry.f_quoted(Type,WithComma)` but it could not be found ``` The captured output also shows neighboring array and nested-array resolutions returning rows, while the comma-containing composite-type path stops at function creation. The runner recorded the same failure as `root returned table rev6_retry.f_quoted(Type,WithComma) but it could not be found`. ### Result The captured SQL and source excerpts support the reported REV-6 failure: a valid function using the quoted composite type `rev6_retry."Type,WithComma"` cannot be created because the server returns an internal root/table lookup error before the quoted-type regprocedure lookup can complete. ### Test context The target is a PostgreSQL-compatible wire service on port 5432, so the browser navigation probe was not the product assertion; the SQL client execution is the relevant evidence. The initial schema cleanup used an unsupported `DROP SCHEMA ... CASCADE`, so the retry used a fresh schema and then reached the quoted-type failure.