Re: cataloguing NOT NULL constraints

2022-08-31 Thread Zhihong Yu
On Wed, Aug 31, 2022 at 4:08 PM Zhihong Yu wrote: > > > On Wed, Aug 31, 2022 at 3:19 PM Alvaro Herrera > wrote: > >> So I was wrong in thinking that "this case was simple to implement" as I >> replied upthread. Doing that actually required me to rewrite lar

Re: On login trigger: take three

2022-09-02 Thread Zhihong Yu
On Fri, Sep 2, 2022 at 8:37 AM Daniel Gustafsson wrote: > This had bitrotted a fair bit, attached is a rebase along with (mostly) > documentation fixes. 0001 adds a generic GUC for ignoring event triggers > and > 0002 adds the login event with event trigger support, and hooks it up to > the > GU

freeing LDAPMessage in CheckLDAPAuth

2022-09-03 Thread Zhihong Yu
Hi, In CheckLDAPAuth(), around line 2606: if (r != LDAP_SUCCESS) { ereport(LOG, (errmsg("could not search LDAP for filter \"%s\" on server \"%s\": %s", It seems that the call to ldap_msgfree() is missing in the above case. According to https://www.o

Re: freeing LDAPMessage in CheckLDAPAuth

2022-09-04 Thread Zhihong Yu
On Sun, Sep 4, 2022 at 12:25 AM Michael Paquier wrote: > On Sun, Sep 04, 2022 at 01:52:10AM -0400, Tom Lane wrote: > > I can't get too excited about this. All of the error exit paths in > > backend authentication code will lead immediately to process exit, so > > the possibility of some memory b

Re: freeing LDAPMessage in CheckLDAPAuth

2022-09-04 Thread Zhihong Yu
On Sun, Sep 4, 2022 at 3:58 AM Zhihong Yu wrote: > > > On Sun, Sep 4, 2022 at 12:25 AM Michael Paquier > wrote: > >> On Sun, Sep 04, 2022 at 01:52:10AM -0400, Tom Lane wrote: >> > I can't get too excited about this. All of the error exit paths in >>

Re: freeing LDAPMessage in CheckLDAPAuth

2022-09-05 Thread Zhihong Yu
On Sun, Sep 4, 2022 at 10:37 PM Michael Paquier wrote: > On Sun, Sep 04, 2022 at 06:52:37AM -0700, Zhihong Yu wrote: > > Please take a look at patch v3. > > Fine as far as it goes. I would have put the initialization of > search_message closer to ldap_search_s() for cons

Re: Table AM modifications to accept column projection lists

2022-09-05 Thread Zhihong Yu
On Mon, Sep 5, 2022 at 9:51 AM Nikita Malakhov wrote: > Hi hackers! > > This is the original patch rebased onto v15 master with conflicts > resolved. I'm currently > studying it and latest comments in the original thread, and would try go > the way that > was mentioned in the thread (last message

Re: cataloguing NOT NULL constraints

2022-09-09 Thread Zhihong Yu
Hi, w.r.t. the while loop in findNotNullConstraintAttnum(): + if (multiple == NULL) + break; I think `pfree(arr)` should be called before breaking. + if (constraint->cooked_expr != NULL) + return tryExtractNotNullFromNode(stringToNode(constraint->cooked_expr), rel

default sorting behavior for index

2022-09-20 Thread Zhihong Yu
Hi, I was looking at this check in src/backend/parser/parse_utilcmd.c w.r.t. constraint: if (indclass->values[i] != defopclass || attform->attcollation != index_rel->rd_indcollation[i] || attoptions != (Datum) 0 || index_r

<    1   2   3   4   5   6