Thread: Adddepend

Adddepend

From
Rod Taylor
Date:
- Corrections for tables, columns with uppercase characters
- Don't attempt to convert partial or expressional unique indexes
- Don't attempt to convert unique indexes based on a non-default
opclasses

- Untested prevention of conversion of non-btree indexes unique
indexes.  Untested as postgresql doesn't allow hash, gist, or rtree
based indexes to be unique.

rbt=# create unique index t on a using hash (col);
ERROR:  DefineIndex: access method "hash" does not support UNIQUE
indexes
rbt=# create unique index t on a using gist (col);
ERROR:  DefineIndex: access method "gist" does not support UNIQUE
indexes
rbt=# select version();
                                version
------------------------------------------------------------------------
 PostgreSQL 7.4devel on i386-unknown-freebsd4.8, compiled by GCC 2.95.4

--
Rod Taylor <rbt@rbt.ca>

PGP Key: http://www.rbt.ca/rbtpub.asc

Attachment

Re: Adddepend

From
Bruce Momjian
Date:
Your patch has been added to the PostgreSQL unapplied patches list at:

    http://momjian.postgresql.org/cgi-bin/pgpatches

I will try to apply it within the next 48 hours.

---------------------------------------------------------------------------


Rod Taylor wrote:
-- Start of PGP signed section.
> - Corrections for tables, columns with uppercase characters
> - Don't attempt to convert partial or expressional unique indexes
> - Don't attempt to convert unique indexes based on a non-default
> opclasses
>
> - Untested prevention of conversion of non-btree indexes unique
> indexes.  Untested as postgresql doesn't allow hash, gist, or rtree
> based indexes to be unique.
>
> rbt=# create unique index t on a using hash (col);
> ERROR:  DefineIndex: access method "hash" does not support UNIQUE
> indexes
> rbt=# create unique index t on a using gist (col);
> ERROR:  DefineIndex: access method "gist" does not support UNIQUE
> indexes
> rbt=# select version();
>                                 version
> ------------------------------------------------------------------------
>  PostgreSQL 7.4devel on i386-unknown-freebsd4.8, compiled by GCC 2.95.4
>
> --
> Rod Taylor <rbt@rbt.ca>
>
> PGP Key: http://www.rbt.ca/rbtpub.asc

[ Attachment, skipping... ]
-- End of PGP section, PGP failed!

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

Re: Adddepend

From
Bruce Momjian
Date:
Patch applied.  Thanks.

---------------------------------------------------------------------------



Rod Taylor wrote:
-- Start of PGP signed section.
> - Corrections for tables, columns with uppercase characters
> - Don't attempt to convert partial or expressional unique indexes
> - Don't attempt to convert unique indexes based on a non-default
> opclasses
>
> - Untested prevention of conversion of non-btree indexes unique
> indexes.  Untested as postgresql doesn't allow hash, gist, or rtree
> based indexes to be unique.
>
> rbt=# create unique index t on a using hash (col);
> ERROR:  DefineIndex: access method "hash" does not support UNIQUE
> indexes
> rbt=# create unique index t on a using gist (col);
> ERROR:  DefineIndex: access method "gist" does not support UNIQUE
> indexes
> rbt=# select version();
>                                 version
> ------------------------------------------------------------------------
>  PostgreSQL 7.4devel on i386-unknown-freebsd4.8, compiled by GCC 2.95.4
>
> --
> Rod Taylor <rbt@rbt.ca>
>
> PGP Key: http://www.rbt.ca/rbtpub.asc

[ Attachment, skipping... ]
-- End of PGP section, PGP failed!

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073