Re: WIP: generalized index constraints - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: WIP: generalized index constraints
Date
Msg-id 20090821130134.GA5487@alvh.no-ip.org
Whole thread Raw
In response to Re: WIP: generalized index constraints  (Brendan Jurd <direvus@gmail.com>)
Responses Re: WIP: generalized index constraints  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Brendan Jurd escribió:

> I would be fine with a NOTICE in the former case, so something like
> this would be cool
> 
> # CREATE TABLE foo (LIKE bar INCLUDING INDEXES);
> NOTICE: INCLUDING INDEXES will also include any constraints on those indexes.
> HINT: Specify EXCLUDING CONSTRAINTS to omit them.
> 
> To my mind the severity is similar to such notices as "NOTICE: CREATE
> TABLE / UNIQUE will create implicit index ...".
> 
> i.e., "this is probably what you wanted us to do, but just in case you
> weren't expecting this side-effect, we're letting you know about it".

NOTICEs is what we do with index creation on primary key, unique
indexes, and sequences on serial columns, and I think they are seen as
just noise by everyone except novices.  Do we want to add more?

Maybe they should be INFO, so that they are shown to the client but not
sent to the server log.

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.


pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Index-only quals
Next
From: Zdenek Kotala
Date:
Subject: SIGUSR1 pingpong between master na autovacum launcher causes crash