Search Postgresql Archives

Re: are foreign keys realized as indexes?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Felix Kater <fkater@xxxxxxxxxxxxxx> writes:
> On Tue, 8 May 2007 15:54:08 +0200
> Martijn van Oosterhout <kleptog@xxxxxxxxx> wrote:
>> A unique index is not a "substitute" for a unique constraint, they're
>> exactly the same thing.

> Yes. For this reason I didn't have to implement *both* 'unique
> constraints' *and* 'unique indices' in my pg interface.

If you are trying to get away with a dumbed-down subset of SQL, be
prepared for people to refuse to use your tool ;-).

You have to support the unique-constraint syntax because the SQL spec
says so (and people are used to it), and you have to support the
create-index syntax because it gives access to functionality not
available through the constraint syntax.  Unique indexes on expressions
for instance.

			regards, tom lane


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux