gram.y comment issue
gram.y comment issue
От:
张文升 <wensheng.zhang@qunar.com>
Дата:
hello,
The gram.y includes the line(line:1965):
/* ALTER TABLE ALTER [COLUMN] 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
Re: gram.y comment issue
От:
Amit Langote <amitlangote09@gmail.com>
Дата:
On Wed, Mar 9, 2016 at 3:04 PM, =E5=BC=A0=E6=96=87=E5=8D=87 wrote: > The gram.y includes the line(line:1965): > /* ALTER TABLE ALTER [COLUMN] SET ( column_parameter =3D > 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 () in a SELECT query, where each member of the list is a SortGroupClause item. Thanks, Amit
Re: gram.y comment issue
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Amit Langote writes: > On Wed, Mar 9, 2016 at 3:04 PM, å¼ æå wrote: >> The gram.y includes the line(line:1965): >> /* ALTER TABLE ALTER [COLUMN] 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 () 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