diff -cprN head/src/backend/catalog/pg_type.c work/src/backend/catalog/pg_type.c *** head/src/backend/catalog/pg_type.c 2010-01-04 09:10:26.638773000 +0900 --- work/src/backend/catalog/pg_type.c 2010-02-02 13:26:19.509652431 +0900 *************** *** 18,23 **** --- 18,24 ---- #include "access/xact.h" #include "catalog/dependency.h" #include "catalog/indexing.h" + #include "catalog/namespace.h" #include "catalog/pg_namespace.h" #include "catalog/pg_proc.h" #include "catalog/pg_type.h" *************** RenameTypeInternal(Oid typeOid, const ch *** 654,661 **** elog(ERROR, "cache lookup failed for type %u", typeOid); typ = (Form_pg_type) GETSTRUCT(tuple); ! /* We are not supposed to be changing schemas here */ ! Assert(typeNamespace == typ->typnamespace); arrayOid = typ->typarray; --- 655,664 ---- elog(ERROR, "cache lookup failed for type %u", typeOid); typ = (Form_pg_type) GETSTRUCT(tuple); ! /* We are not supposed to be changing schemas here except toast types */ ! Assert(typeNamespace == typ->typnamespace || ! (typeNamespace == PG_TOAST_NAMESPACE && ! isTempToastNamespace(typ->typnamespace))); arrayOid = typ->typarray; diff -cprN head/src/test/regress/expected/cluster.out work/src/test/regress/expected/cluster.out *** head/src/test/regress/expected/cluster.out 2007-09-03 11:41:01.356378000 +0900 --- work/src/test/regress/expected/cluster.out 2010-02-02 13:48:30.442646909 +0900 *************** SELECT * FROM clustertest; *** 434,439 **** --- 434,443 ---- 100 (5 rows) + -- Test temp table + CREATE TEMP TABLE temptbl (col1 integer, col2 text); + CREATE INDEX temptbl_col1_idx on temptbl (col1); + CLUSTER temptbl USING temptbl_col1_idx; -- clean up \c - DROP TABLE clustertest; diff -cprN head/src/test/regress/sql/cluster.sql work/src/test/regress/sql/cluster.sql *** head/src/test/regress/sql/cluster.sql 2007-09-03 11:41:01.356378000 +0900 --- work/src/test/regress/sql/cluster.sql 2010-02-02 13:48:36.679647971 +0900 *************** COMMIT; *** 187,192 **** --- 187,197 ---- SELECT * FROM clustertest; + -- Test temp table + CREATE TEMP TABLE temptbl (col1 integer, col2 text); + CREATE INDEX temptbl_col1_idx on temptbl (col1); + CLUSTER temptbl USING temptbl_col1_idx; + -- clean up \c - DROP TABLE clustertest;