On Tue, Jul 2, 2019 at 4:46 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> > I think it should cause an error, most likely an unintentional
> > implementation mistake -- so the sooner it is flagged the better to
> > remedy it!
>
> On reflection that might be overkill. I've heard of people using
> unique indexes on constants to constrain tables to one row, and
> you can make interesting refinements by making the index partial.
I think it's overkill. As you pointed out not too long ago, there are
several ways to define an index that probably or definitely results in
a useless index. There is no reason to draw the line here, or
anywhere.
--
Peter Geoghegan