Re: WIP: generalized index constraints

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Brendan Jurd <direvus(at)gmail(dot)com>
Cc: Jeff Davis <pgsql(at)j-davis(dot)com>, Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: WIP: generalized index constraints
Date: 2009-08-21 13:01:34
Message-ID: 20090821130134.GA5487@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Zdenek Kotala 2009-08-21 13:22:34 SIGUSR1 pingpong between master na autovacum launcher causes crash
Previous Message Heikki Linnakangas 2009-08-21 12:27:54 Re: Index-only quals