Re: wrong comments in ClassifyUtilityCommandAsReadOnly

2024-12-22 Thread David Rowley
On Mon, 23 Dec 2024 at 18:53, Tom Lane wrote: > > David Rowley writes: > > Another reason I deleted that is that > > since the file contains helper functions, I didn't want to write a new > > comment based on what functions are there now as it may put someone > > else off from adding new ones if

Re: wrong comments in ClassifyUtilityCommandAsReadOnly

2024-12-22 Thread Tom Lane
David Rowley writes: > On Mon, 23 Dec 2024 at 16:37, Tom Lane wrote: >> Also, rather than simply remove >> define.c's entire header comment, maybe we should write something >> relevant about what it does? Good catches otherwise. > I didn't have any inspiration on what to write other than what's

Re: wrong comments in ClassifyUtilityCommandAsReadOnly

2024-12-22 Thread David Rowley
On Mon, 23 Dec 2024 at 16:37, Tom Lane wrote: > > David Rowley writes: > > + * The "DefineAggregate" routine take the parse tree and pick out the > > + * appropriate arguments/flags, passing the results to > > + * "AggregateCreate" routine (src src/backend/catalog) that do the > > ac

Re: wrong comments in ClassifyUtilityCommandAsReadOnly

2024-12-22 Thread Tom Lane
David Rowley writes: > + * The "DefineAggregate" routine take the parse tree and pick out the > + * appropriate arguments/flags, passing the results to > + * "AggregateCreate" routine (src src/backend/catalog) that do the actual > + * catalog-munging. These routines also verify pe

Re: wrong comments in ClassifyUtilityCommandAsReadOnly

2024-12-22 Thread David Rowley
On Sat, 21 Dec 2024 at 17:06, jian he wrote: > * Note the definitions of the relevant flags in src/include/utility/tcop.h. > */ > static int > ClassifyUtilityCommandAsReadOnly(Node *parsetree) > > Is the comment wrong? > > it should be > " * Note the definitions of the relevant flags in src/incl

wrong comments in ClassifyUtilityCommandAsReadOnly

2024-12-20 Thread jian he
hi. /* * Determine the degree to which a utility command is read only. * * Note the definitions of the relevant flags in src/include/utility/tcop.h. */ static int ClassifyUtilityCommandAsReadOnly(Node *parsetree) Is the comment wrong? it should be " * Note the definitions of the relevant fla