From: | Fabrízio de Royes Mello <fabriziomello(at)gmail(dot)com> |
---|---|
To: | Marti Raudsepp <marti(at)juffo(dot)org> |
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-06 01:17:43 |
Message-ID: | CAFcNs+p4b2KHnGJSn_10AKjp3MYjjmYHGE+5_cevoAAKiR1wFQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sun, Oct 5, 2014 at 9:52 AM, Marti Raudsepp <marti(at)juffo(dot)org> wrote:
>
> > 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. :)
>
Well, I try to show that "IF NOT EXISTS" require the "name". Is this wrong?
Anyway I fixed that way:
CREATE INDEX ... [ IF NOT EXISTS [ name ] ] ON ...
Maybe is better than the last... what you think?
> I would add a human-language explanation to IF NOT EXISTS description:
> Index name is required when IF NOT EXISTS is specified
>
Ok.
> ----
> 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",
>
Ohh... sorry... again... my mistake :-( now all was fixed.
> ----
> 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;
>
Fixed.
Thanks again!
Regards,
--
Fabrízio de Royes Mello
Consultoria/Coaching PostgreSQL
>> Timbira: http://www.timbira.com.br
>> Blog: http://fabriziomello.github.io
>> Linkedin: http://br.linkedin.com/in/fabriziomello
>> Twitter: http://twitter.com/fabriziomello
>> Github: http://github.com/fabriziomello
Attachment | Content-Type | Size |
---|---|---|
create_index_if_not_exists_v6.patch | text/x-diff | 10.0 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Craig Ringer | 2014-10-06 01:32:28 | Feasibility of supporting bind params for all command types |
Previous Message | Tom Lane | 2014-10-05 22:42:03 | Re: Proposal for better support of time-varying timezone abbreviations |