Richard, Tom:

> > > Call me crazy, but maybe we have to throw a message for primary
> > > key lookups on foreign key tables without indexes.  I hate to throw a
> > > message on update/delete rather than create table, but I don't see
> > > another way.

You're crazy.   For one thing, there are sometimes reasons to *not* have such 
an index, and I really don't want a message I can't turn off thinking it 
knows how to design a database better than me.   Second, many applications 
will take warnings on update as an error condition and abort; this would be 
fatal to them.

> > I don't think that will fly.  It's too noisy/repetitive, and it's
> > complaining at the wrong time (in production rather than when you're
> > setting up the DB schema).  Imagine how annoying it would be to get
> > such warnings if you were a user without the privileges needed to create
> > the requested index.

Not to water down anyone's beer, but I'm personally wondering how much good 
any of these warnings will do, on CREATE TABLE or ADD CONSTRAINT or 
otherwise.  I already get 2-4 warnings whenever creating a new table due to 
keys, etc.   I don't read them anymore unless one of them is an ERROR, and I 
suspect that a lot of DBAs are the same.

-- 
Josh Berkus
Aglio Database Solutions
San Francisco

Mon, 15 Mar 2004 10:57:45 -0800
Josh Berkus <josh@agliodbs.com>
Re: Further thoughts about warning for costly FK checks
On Mon, Mar 15, 2004 at 10:57:45AM -0800, Josh Berkus wrote:
> otherwise.  I already get 2-4 warnings whenever creating a new table due to 
> keys, etc.   I don't read them anymore unless one of them is an ERROR, and I 
> suspect that a lot of DBAs are the same.

I can second that.  At least, I don't pay a whole lot of attention to
these messages any more.  That doesn't mean it's a bad thing to do,
of course, since I _did_ look at them when I was inexperienced with
Postgres.

A

-- 
Andrew Sullivan  | ajs@crankycanuck.ca

Tue, 16 Mar 2004 07:50:14 -0500
Andrew Sullivan <ajs@crankycanuck.ca>
Re: Further thoughts about warning for costly FK checks