diff options
| author | Tom Lane | 2010-02-02 19:12:29 +0000 |
|---|---|---|
| committer | Tom Lane | 2010-02-02 19:12:29 +0000 |
| commit | c98157d693edefdbf5e37bca9b26c18a80018dd4 (patch) | |
| tree | cb02e574630bc996cffe676ceb7bcab8c364b883 /src/test | |
| parent | 0a2734714127b01d1f77468766d132064a1d6a97 (diff) | |
CLUSTER specified the wrong namespace when renaming toast tables of temporary
relations (they don't live in pg_toast). This caused an Assert failure in
assert-enabled builds. So far as I can see, in a non-assert build it would
only have messed up the checks for conflicting names, so a failure would be
quite improbable but perhaps not impossible.
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/regress/expected/cluster.out | 12 | ||||
| -rw-r--r-- | src/test/regress/sql/cluster.sql | 6 |
2 files changed, 18 insertions, 0 deletions
diff --git a/src/test/regress/expected/cluster.out b/src/test/regress/expected/cluster.out index 9bf4764b68..23d0a3cd50 100644 --- a/src/test/regress/expected/cluster.out +++ b/src/test/regress/expected/cluster.out @@ -434,6 +434,18 @@ SELECT * FROM clustertest; 100 (5 rows) +-- check that temp tables can be clustered +create temp table clstr_temp (col1 int primary key, col2 text); +NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "clstr_temp_pkey" for table "clstr_temp" +insert into clstr_temp values (2, 'two'), (1, 'one'); +cluster clstr_temp using clstr_temp_pkey; +select * from clstr_temp; + col1 | col2 +------+------ + 1 | one + 2 | two +(2 rows) + -- clean up \c - DROP TABLE clustertest; diff --git a/src/test/regress/sql/cluster.sql b/src/test/regress/sql/cluster.sql index a54d6e07f5..f3f7a24810 100644 --- a/src/test/regress/sql/cluster.sql +++ b/src/test/regress/sql/cluster.sql @@ -187,6 +187,12 @@ COMMIT; SELECT * FROM clustertest; +-- check that temp tables can be clustered +create temp table clstr_temp (col1 int primary key, col2 text); +insert into clstr_temp values (2, 'two'), (1, 'one'); +cluster clstr_temp using clstr_temp_pkey; +select * from clstr_temp; + -- clean up \c - DROP TABLE clustertest; |
