Re: are foreign keys realized as indexes?
| От | Tom Lane | 
|---|---|
| Тема | Re: are foreign keys realized as indexes? | 
| Дата | |
| Msg-id | 26668.1178721565@sss.pgh.pa.us обсуждение исходный текст  | 
		
| Ответ на | Re: are foreign keys realized as indexes? (Felix Kater <fkater@googlemail.com>) | 
| Список | pgsql-general | 
Felix Kater <fkater@googlemail.com> writes:
> On Tue, 8 May 2007 15:54:08 +0200
> Martijn van Oosterhout <kleptog@svana.org> 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
		
	В списке pgsql-general по дате отправления: