Re: CREATE IF NOT EXISTS INDEX

From: Marti Raudsepp <marti(at)juffo(dot)org>
To: fabriziomello(at)gmail(dot)com
Cc: Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>, José Luis Tallón <jltallon(at)adv-solutions(dot)net>
Subject: Re: CREATE IF NOT EXISTS INDEX
Date: 2014-10-05 12:52:19
Message-ID: CABRT9RDTMwN03TjyH42NNOvpfD=Kiv5hhY0dbBNLfJCxg0XdKw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Oct 3, 2014 at 7:25 PM, Fabrízio de Royes Mello
<fabriziomello(at)gmail(dot)com> wrote:
> I agree with your grammar change.

Cool.

> The version 5 (attached) contains all discussed until now.

From documentation:

CREATE INDEX ... [ IF NOT EXISTS name | name ] ON ...

Maybe I'm just slow, but it took me a few minutes to understand what
this means. :)

I would add a human-language explanation to IF NOT EXISTS description:
Index name is required when IF NOT EXISTS is specified

----
You have resurrected this bit again, which now conflicts with git master...

- write_msg(NULL, "reading row-security enabled for table \"%s\"",
+ write_msg(NULL, "reading row-security enabled for table \"%s\"\n",

----
n->concurrent = $4;
+ n->if_not_exists = false;
n->idxname = $5;

Minor stylistic thing: now that this is a constant, I would move it to
the end together with other constant assignments, and follow the
struct's field ordering (in both code paths):

n->isconstraint = false;
n->deferrable = false;
n->initdeferred = false;
n->if_not_exists = false;

Regards,
Marti

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2014-10-05 14:25:50 Re: RLS with check option - surprised design
Previous Message Stephen Frost 2014-10-05 12:16:01 Re: RLS with check option - surprised design