Re: REVIEW: ALTER TABLE ... ADD FOREIGN KEY ... NOT ENFORCED

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Marko Tiikkaja <marko(dot)tiikkaja(at)cs(dot)helsinki(dot)fi>
Cc: Peter Geoghegan <peter(dot)geoghegan86(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Dimitri Fontaine <dimitri(at)2ndquadrant(dot)fr>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: REVIEW: ALTER TABLE ... ADD FOREIGN KEY ... NOT ENFORCED
Date: 2011-01-23 19:06:21
Message-ID: 1295809581.1803.20458.camel@ebony
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, 2011-01-23 at 20:56 +0200, Marko Tiikkaja wrote:
> On 1/23/2011 8:43 PM, Simon Riggs wrote:
> > On Sun, 2011-01-23 at 20:33 +0200, Marko Tiikkaja wrote:
> >> On 1/23/2011 8:23 PM, Simon Riggs wrote:
> >>> On Sun, 2011-01-23 at 19:50 +0200, Marko Tiikkaja wrote:
> >>>> Another problem I found is that psql doesn't indicate in any way that a
> >>>> FOREIGN KEY constraint is not validated yet.
> >>>
> >>> Should it?
> >>> What command do you think needs changing?
> >>
> >> \d table now only shows that there's a FOREIGN KEY, which might lead the
> >> user to think that there should not be any values that don't exist in
> >> the referenced table.
> >
> > Neither \d nor \di shows invalid indexes.
>
> What exactly are you referring to? An index with indisvalid=false looks
> like this in my psql:
>
> "fooindex" btree (a) INVALID
>
> And even if it didn't, I don't think we should be adding more
> deficiencies to psql.

OK, thanks, I wasn't aware of that.

I'll add something similar for FKs.

--
Simon Riggs http://www.2ndQuadrant.com/books/
PostgreSQL Development, 24x7 Support, Training and Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2011-01-23 19:18:57 Re: Bug in pg_describe_object, patch v2
Previous Message Marko Tiikkaja 2011-01-23 18:56:32 Re: REVIEW: ALTER TABLE ... ADD FOREIGN KEY ... NOT ENFORCED