postgres.git / summary / log / commit / refs

commit    55dc7faea2af6a3ccc9dc3692e87e32c2ac4c2cf
Author:   Tom Lane <tgl@sss.pgh.pa.us>
Date:     Wed Aug 04 20:53:53 2004 +0000

    Fix silly thinko in ALTER COLUMN TYPE.  Check for finding expected
    dependency was looking at wrong columns and so would always fail.
    Was not exposed by regression tests because we are only testing cases
    involving built-in (pinned) types and so no actual dependency entry
    exists to be removed.


src/backend/commands/tablecmds.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c index b69e386990e..bc5339a91bf 100644 --- a/src/backend/commands/tablecmds.c +++ b/src/backend/commands/tablecmds.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/commands/tablecmds.c,v 1.123 2004/08/01 20:30:48 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/commands/tablecmds.c,v 1.124 2004/08/04 20:53:53 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -4888,8 +4888,8 @@ ATExecAlterColumnType(AlteredTableInfo *tab, Relation rel, if (foundDep->deptype != DEPENDENCY_NORMAL) elog(ERROR, "found unexpected dependency type '%c'", foundDep->deptype); - if (foundDep->classid != RelOid_pg_type || - foundDep->objid != attTup->atttypid) + if (foundDep->refclassid != RelOid_pg_type || + foundDep->refobjid != attTup->atttypid) elog(ERROR, "found unexpected dependency for column"); simple_heap_delete(depRel, &depTup->t_self); [parent: e84c71b4e6b0]