Re: [PATCH v1] eliminate duplicate code in table.c - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: [PATCH v1] eliminate duplicate code in table.c
Date
Msg-id CAA4eK1+PrmO2Y76YL6a9WHDZMiMWKmuz1i=K5V3Qsp_b3V6fpw@mail.gmail.com
Whole thread Raw
In response to Re: [PATCH v1] eliminate duplicate code in table.c  (Aleksander Alekseev <aleksander@timescale.com>)
Responses Re: [PATCH v1] eliminate duplicate code in table.c
List pgsql-hackers
On Thu, Jul 21, 2022 at 5:09 PM Aleksander Alekseev
<aleksander@timescale.com> wrote:
>
> > > There are some duplicate code in table.c, add a static inline function
> > > to eliminate the duplicates.
> > >
> >
> > Can we name function as validate_object_type, or check_object_type?
> >
> > Otherwise, the patch looks fine to me. Let's see if others have
> > something to say.
>
> LGTM
>

@@ -161,10 +121,32 @@ table_openrv_extended(const RangeVar *relation,
LOCKMODE lockmode,
  *
  * Note that it is often sensible to hold a lock beyond relation_close;
  * in that case, the lock is released automatically at xact end.
- * ----------------
+ * ----------------
  */
 void
 table_close(Relation relation, LOCKMODE lockmode)

I don't think this change should be part of this patch. Do you see a
reason for doing this?


-- 
With Regards,
Amit Kapila.



pgsql-hackers by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: Use extended statistics to estimate (Var op Var) clauses
Next
From: Aleksander Alekseev
Date:
Subject: Re: [PATCH v1] eliminate duplicate code in table.c