Re: [PATCH] Provide support for trailing commas

From: Greg Sabino Mullane <htamfids(at)gmail(dot)com>
To: Peter Eisentraut <peter(at)eisentraut(dot)org>
Cc: "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: [PATCH] Provide support for trailing commas
Date: 2026-03-23 22:54:28
Message-ID: CAKAnmmKWEffLVRRSYkqKMKoK6RoZc1ecT_rPzMkVsuqOgzbjog@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Alright, I walked through the entire list of every place the original patch
added a comma, and ruthlessly trimmed out the ones that were not really
needed, likely to cause issues, and/or frankly applied on too trivial a
piece of SQL to worry about. Here's my list that people can poke at. Once
we settle on which ones survive, I can make a new patch. The focus is
mostly on the largest potential uses: lists of select items / column names.

Items to keep (i.e. add trailing comma support):

utility_option_list
TableElementList
opt_column_list
optional_period_name
index_params, index_including_params
table_func_column_list
insert_column_list
opt_search_clause (also has some minor refactoring and adds
depth_or_breadth)
sortby_list
group_by_list
vacuum_relation_list
from_list
xmltable_column_list
xml_namespace_list
array_expr_list
target_list
qualified_name_list

Items I am not sure about:

TriggerFuncArgs (seems sensible, low impact)
enum_val_list (since it is kind of a column list)
any_name_list / role_list (weak +1)
type_name_list (trivial but rarely used)
set_clause_list (weak +1)
relation_expr_list (mostly for LOCK)
rowsfrom_list (trivial)
json_table_column_definition_list (another sort column list thing)
expr_list (this is the controversial ROW() one)

Items I can Relucatantly Skip:

alter_table_cmds
reloption_list
hash_partbound
alter_type_cmds
copy_generic_opt_arg_list
opt_without_overlaps
ExclusionConstraintList
part_params
stats_param
generic_option_list
alter_generic_option_list
event_trigger_value_list
def_list
opclass_item_list
opclass_drop_list
privilege_list
parameter_name_list
grant_tole_opt_list
aggr_args_list
aggregate_with_argtypes_list
transform_type_list
operator_with_argtypes_list
operator_def_list
pub_obj_list
pub_all_obj_type_list
transaction_mode_list
drop_option_list (only one option now anyway!)
set_target_list
TableFuncElementList
bxml_attribute_list (code has changed anyway!)
window_definition_list
func_arg_list
type_list
name_list (mostly for permissions)

Cheers,
Greg

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2026-03-23 23:03:41 Re: Adding comments to help understand psql hidden queries
Previous Message Greg Sabino Mullane 2026-03-23 22:50:16 Re: Adding comments to help understand psql hidden queries