Here is a change to the alter_table regression test to use ALTER INDEX ...
RENAME instead of ALTER TABLE ... RENAME in the case of an index renaming.
Its probably not the right place for it, but I'm not sure where is the
right place for it.

Thanks,

Gavin

On Sat, 21 Aug 2004, Tom Lane wrote:

> Gavin Sherry <[EMAIL PROTECTED]> writes:
> > Thanks for spotting this sloppy work. Basically, I cropped my diff because
> > there was lots of unrelated code in the work space. But I was a little too
> > hard and culled allfiles.sgml, alter.c, equal/copyfuncs.c and analyze.c.
>
> I was wondering if something like that might have happened --- I know
> you know better on all these points ;-)
>
> > I was getting together a patch against HEAD but I just noticed that you
> > fixed this. Thanks.
>
> Yeah, I think everything is fixed in CVS tip.  Let me know if there was
> anything I missed.
>
>                       regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
>
>
> !DSPAM:4127e64e43221930617052!
>
>
Index: src/test/regress/expected/alter_table.out
===================================================================
RCS file: /usr/local/cvsroot/pgsql-server/src/test/regress/expected/alter_table.out,v
retrieving revision 1.84
diff -2 -c -r1.84 alter_table.out
*** src/test/regress/expected/alter_table.out   10 Jun 2004 17:56:00 -0000      1.84
--- src/test/regress/expected/alter_table.out   22 Aug 2004 00:54:31 -0000
***************
*** 127,132 ****
  -- ALTER TABLE ... RENAME on non-table relations
  -- renaming indexes (FIXME: this should probably test the index's functionality)
! ALTER TABLE onek_unique1 RENAME TO tmp_onek_unique1;
! ALTER TABLE tmp_onek_unique1 RENAME TO onek_unique1;
  -- renaming views
  CREATE VIEW tmp_view (unique1) AS SELECT unique1 FROM tenk1;
--- 127,132 ----
  -- ALTER TABLE ... RENAME on non-table relations
  -- renaming indexes (FIXME: this should probably test the index's functionality)
! ALTER INDEX onek_unique1 RENAME TO tmp_onek_unique1;
! ALTER INDEX tmp_onek_unique1 RENAME TO onek_unique1;
  -- renaming views
  CREATE VIEW tmp_view (unique1) AS SELECT unique1 FROM tenk1;
Index: src/test/regress/sql/alter_table.sql
===================================================================
RCS file: /usr/local/cvsroot/pgsql-server/src/test/regress/sql/alter_table.sql,v
retrieving revision 1.46
diff -2 -c -r1.46 alter_table.sql
*** src/test/regress/sql/alter_table.sql        5 May 2004 04:48:48 -0000       1.46
--- src/test/regress/sql/alter_table.sql        22 Aug 2004 00:54:31 -0000
***************
*** 167,172 ****
  -- ALTER TABLE ... RENAME on non-table relations
  -- renaming indexes (FIXME: this should probably test the index's functionality)
! ALTER TABLE onek_unique1 RENAME TO tmp_onek_unique1;
! ALTER TABLE tmp_onek_unique1 RENAME TO onek_unique1;
  -- renaming views
  CREATE VIEW tmp_view (unique1) AS SELECT unique1 FROM tenk1;
--- 167,172 ----
  -- ALTER TABLE ... RENAME on non-table relations
  -- renaming indexes (FIXME: this should probably test the index's functionality)
! ALTER INDEX onek_unique1 RENAME TO tmp_onek_unique1;
! ALTER INDEX tmp_onek_unique1 RENAME TO onek_unique1;
  -- renaming views
  CREATE VIEW tmp_view (unique1) AS SELECT unique1 FROM tenk1;
---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Reply via email to