Re: SQL Property Graph Queries (SQL/PGQ) - Mailing list pgsql-hackers

From zengman
Subject Re: SQL Property Graph Queries (SQL/PGQ)
Date
Msg-id tencent_42822B9B27BF335F1C7A7C11@qq.com
Whole thread Raw
In response to Re: SQL Property Graph Queries (SQL/PGQ)  (Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>)
List pgsql-hackers
> > Hi,
> >
> > Thank you for your review. I understand your feedback – this was a result of my personal coding habit: I prefer to
>explicitly call `free_parsestate()`, and also want to respect the comment associated with `make_parsestate()` (shown
below):
> > ```
> 
> As Robert Haas explained in a nearby thread, we usually don't accept
> patches that modify code for personal preferences. We instead follow
> precedence. Also the email proposing the patches should explain why
> those changes are being proposed, especially when they are more than
> trivial changes.
> 

I understand, thank you very much for your guidance.

> > /*
> >  * make_parsestate
> >  *              Allocate and initialize a new ParseState.
> >  *
> >  * Caller should eventually release the ParseState via free_parsestate().
> >  */
> > ```
> > For this reason, I have made minor modifications to this section of the code.
> >
> 
> Given that we have many other callers who do not call
> free_parsestate(), probably this should change, as a separate patch
> though. Maybe there is a pattern of when to call free_parsestate() and
> when not to. It will be good to add a clarifying comment here.

Yes, I completely agree with your suggestion.

--
regards,
Man Zeng

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: [PROPOSAL] Termination of Background Workers for ALTER/DROP DATABASE
Next
From: Amit Kapila
Date:
Subject: Re: Patch for migration of the pg_commit_ts directory