Lists: | pgsql-bugs |
---|
From: | 张文升 <wensheng(dot)zhang(at)qunar(dot)com> |
---|---|
To: | <pgsql-bugs(at)postgresql(dot)org> |
Subject: | gram.y comment issue |
Date: | 2016-03-09 06:04:00 |
Message-ID: | 56DFBCD0.7050909@qunar.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-bugs |
hello,
The gram.y includes the line(line:1965):
/* ALTER TABLE <name> ALTER [COLUMN] <colname> SET ( column_parameter =
value [, ... ] ) */
ALTER opt_column ColId RESET reloptions
The comment has the word "SET", but I think that's should be "RESET".
and
src/include/nodes/parsenodes.h line:141
List *distinctClause; /* a list of SortGroupClause's */
The comment has the word "SortGroupClause", but that's should be
"distinctClause".
I apologize if this is too small of an error to be considered a bug, but I
figured that we want to be the best we can.
regards,wensheng zhang
--
----------------------
张文升 | PostgreSQL DBA
From: | Amit Langote <amitlangote09(at)gmail(dot)com> |
---|---|
To: | 张文升 <wensheng(dot)zhang(at)qunar(dot)com> |
Cc: | pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: gram.y comment issue |
Date: | 2016-03-09 12:54:29 |
Message-ID: | CA+HiwqE=_VkCvzUATY5GUTwiBFbXRpQzKLg4yjGm7Hn1=c4Wyg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-bugs |
On Wed, Mar 9, 2016 at 3:04 PM, 张文升 <wensheng(dot)zhang(at)qunar(dot)com> wrote:
> The gram.y includes the line(line:1965):
> /* ALTER TABLE <name> ALTER [COLUMN] <colname> SET ( column_parameter =
> value [, ... ] ) */
> ALTER opt_column ColId RESET reloptions
>
> The comment has the word "SET", but I think that's should be "RESET".
This one needs to be fixed.
> src/include/nodes/parsenodes.h line:141
> List *distinctClause; /* a list of SortGroupClause's */
> The comment has the word "SortGroupClause", but that's should be
> "distinctClause".
This one is fine. The name distinctClause here is parser's way of
referring to the SQL construct DISTINCT ON (<list-of-items>) in a
SELECT query, where each member of the list is a SortGroupClause item.
Thanks,
Amit
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Amit Langote <amitlangote09(at)gmail(dot)com> |
Cc: | 张文升 <wensheng(dot)zhang(at)qunar(dot)com>, pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: gram.y comment issue |
Date: | 2016-03-09 15:31:06 |
Message-ID: | 9732.1457537466@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-bugs |
Amit Langote <amitlangote09(at)gmail(dot)com> writes:
> On Wed, Mar 9, 2016 at 3:04 PM, <wensheng(dot)zhang(at)qunar(dot)com> wrote:
>> The gram.y includes the line(line:1965):
>> /* ALTER TABLE <name> ALTER [COLUMN] <colname> SET ( column_parameter =
>> value [, ... ] ) */
>> ALTER opt_column ColId RESET reloptions
>> The comment has the word "SET", but I think that's should be "RESET".
> This one needs to be fixed.
Agreed, done.
>> src/include/nodes/parsenodes.h line:141
>> List *distinctClause; /* a list of SortGroupClause's */
>> The comment has the word "SortGroupClause", but that's should be
>> "distinctClause".
> This one is fine. The name distinctClause here is parser's way of
> referring to the SQL construct DISTINCT ON (<list-of-items>) in a
> SELECT query, where each member of the list is a SortGroupClause item.
Yes. It might be surprising if you don't know that ORDER BY, GROUP BY,
and DISTINCT all have a common parsetree representation ... but the
comment is correct as written.
regards, tom lane
From: | 张文升 <wensheng(dot)zhang(at)qunar(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Amit Langote <amitlangote09(at)gmail(dot)com> |
Cc: | <pgsql-bugs(at)postgresql(dot)org> |
Subject: | Re: gram.y comment issue |
Date: | 2016-03-10 02:41:14 |
Message-ID: | 56E0DECA.5010200@qunar.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-bugs |
thanks !
On 2016年03月09日 23:31, Tom Lane wrote:
> Amit Langote
--
----------------------
张文升 | PostgreSQL DBA