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

Re: ADD FOREIGN KEY (was Re: [GENERAL] 7.4Beta)

From: Hannu Krosing <hannu(at)tm(dot)ee>
To: Andreas Pflug <pgadmin(at)pse-consulting(dot)de>
Cc: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>,PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: ADD FOREIGN KEY (was Re: [GENERAL] 7.4Beta)
Date: 2003-09-29 09:57:13
Message-ID: 1064829433.2645.2.camel@fuji.krosing.net (view raw or flat)
Thread:
Lists: pgsql-generalpgsql-hackers
Andreas Pflug kirjutas E, 29.09.2003 kell 12:04:
> Christopher Kings-Lynne wrote:
> 
> > You could just as easily argue that the lack of integrity testing at 
> > data load time was equally a bug.
> >
> > I think we need someway of telling postgres to suppress a foreign key 
> > check.
> >
> > The main problem is that the foreign key column is often not indexed. 
> 
> So a db designer made a bloody mistake.
> The problem is there's no easy way to find out what's missing.
> I'd really like EXPLAIN to display all subsequent triggered queries 
> also, to see the full scans caused by missing indexes.

It could probably be doable for EXPLAIN ANALYZE (by actually tracing
execution), but then you will see really _all_ queries, i.e. for a 1000
row update you would see 1 UPDATE query and 1000 fk checks ...

OTOH, you probably can get that already from logs with right logging
parameters.

-------------
Hannu


In response to

Responses

pgsql-hackers by date

Next:From: Christopher Kings-LynneDate: 2003-09-29 10:28:44
Subject: Re: ADD FOREIGN KEY (was Re: [GENERAL] 7.4Beta)
Previous:From: Christopher Kings-LynneDate: 2003-09-29 09:44:35
Subject: pg_dump permissions problem

pgsql-general by date

Next:From: strkDate: 2003-09-29 10:05:10
Subject: finding memory leaks in extensions
Previous:From: Kris JurkaDate: 2003-09-29 09:52:51
Subject: Re: PostgreSQL SSL communication with SecureTcpClient (Ssl

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