Re: pgsql: If an index depends on no columns of its table, give it a

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: pgsql: If an index depends on no columns of its table, give it a
Дата
Msg-id 11272.1194625688@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: pgsql: If an index depends on no columns of its table, give it a  (Simon Riggs <simon@2ndquadrant.com>)
Ответы Re: pgsql: If an index depends on no columns of its table, give it a
Re: pgsql: If an index depends on no columns of its table, give it a
Список pgsql-committers
Simon Riggs <simon@2ndquadrant.com> writes:
> On Fri, 2007-11-09 at 04:05 -0500, Tom Lane wrote:
>> That was my first reaction too, but the point about unique-index behavior
>> refutes it.  Constraining a table to have at most one row is useful.

> Sure is, and I've done it just a few days ago.

> This SQL does it using standard syntax:

>   create table foo (handle integer primary key check (handle = 1));

That does not constrain the table to have only one row.  It constrains
it to have only one value of the handle field (thereby making the field
useless).  The fact that there are workarounds isn't a reason to not
support the index option.

            regards, tom lane

В списке pgsql-committers по дате отправления:

Предыдущее
От: petere@postgresql.org (Peter Eisentraut)
Дата:
Сообщение: pgsql: Allow XML processing instructions starting with "xml" while
Следующее
От: momjian@postgresql.org (Bruce Momjian)
Дата:
Сообщение: pgsql: Move pl/proxy into Multi-server parallel query execution