Skip site navigation (1) Skip section navigation (2)

Re: WIP: generalized index constraints

From: David Fetter <david(at)fetter(dot)org>
To: Brendan Jurd <direvus(at)gmail(dot)com>
Cc: Jeff Davis <pgsql(at)j-davis(dot)com>,Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>,pgsql-hackers(at)postgresql(dot)org
Subject: Re: WIP: generalized index constraints
Date: 2009-08-22 19:14:37
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
On Fri, Aug 21, 2009 at 12:23:15PM +1000, Brendan Jurd wrote:
> 2009/8/21 Jeff Davis <pgsql(at)j-davis(dot)com>:
> > If they include indexes and not constraints, I think we should
> > follow the same policy as unique constraints, and create the index
> > and the constraint.
> >
> > The behavior seems a little strange to me, but that's the current
> > behavior for unique indexes.
> This may be an opportunity to fix it.
> The current behaviour seems to be predicated on the unique
> constraint being an integral part of the index itself.  While this
> might be true from a system catalog point of view
> (pg_index.indisunique), if a user says that they want to copy a
> they've made their intention perfectly clear.  They'd expect it to
> create an index sans the unique constraint.  Ignoring the user's
> intention and copying the index as-is (including the unique
> constraint) would be unfriendly.
> Unless the SQL spec demands that we do so?

SQL:2008, like its predecessors, does not mention indexing at all.

David Fetter <david(at)fetter(dot)org>
Phone: +1 415 235 3778  AIM: dfetter666  Yahoo!: dfetter
Skype: davidfetter      XMPP: david(dot)fetter(at)gmail(dot)com

Remember to vote!
Consider donating to Postgres:

In response to

pgsql-hackers by date

Next:From: Heikki LinnakangasDate: 2009-08-22 19:18:39
Subject: Re: Resjunk sort columns, Heikki's index-only quals patch, and bug #5000
Previous:From: Gokulakannan SomasundaramDate: 2009-08-22 18:51:21
Subject: Re: Lazy Snapshots

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group