Re: pgsql: If an index depends on no columns of its table, give it a
От
Simon Riggs
Тема
Re: pgsql: If an index depends on no columns of its
table, give it a
Дата
Msg-id
1194680179.4251.525.camel@ebony.site
Ответ на
Список
Дерево обсуждения
pgsql: If an index depends on no columns of its table, give it a tgl@postgresql.org (Tom Lane)
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 Tom Lane <tgl@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 Tom Lane <tgl@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 Tom Lane <tgl@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 Tom Lane <tgl@sss.pgh.pa.us>
Re: pgsql: If an index depends on no columns of its
table, give it a David Fetter <david@fetter.org>
Re: pgsql: If an index depends on no columns of its table, give it a Gregory Stark <stark@enterprisedb.com>
On Fri, 2007-11-09 at 11:28 -0500, Tom Lane wrote: > Simon Riggs 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). It works, sure you need another column to put data in. > The fact that there are workarounds isn't a reason to not > support the index option. The above is not a workaround. It is the SQL Standard way of solving the problem, so why support another non-standard way? Constants in indexes are just a strangeness we don't need. Supporting weird syntax because one person wants it has never been anything you've advocated before, so I'm surprised to see that argument deployed here. -- Simon Riggs 2ndQuadrant http://www.2ndQuadrant.com
В списке pgsql-committers по дате отправления
От: xzilla@pgfoundry.org (User Xzilla)
Дата:
От: momjian@postgresql.org (Bruce Momjian)
Дата: