Re: [PATCH v1] eliminate duplicate code in table.c

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Aleksander Alekseev <aleksander(at)timescale(dot)com>
Cc: Junwang Zhao <zhjwpku(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: [PATCH v1] eliminate duplicate code in table.c
Date: 2022-07-21 11:42:20
Message-ID: CAA4eK1+PrmO2Y76YL6a9WHDZMiMWKmuz1i=K5V3Qsp_b3V6fpw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Jul 21, 2022 at 5:09 PM Aleksander Alekseev
<aleksander(at)timescale(dot)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.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Aleksander Alekseev 2022-07-21 11:49:26 Re: [PATCH v1] eliminate duplicate code in table.c
Previous Message Tomas Vondra 2022-07-21 11:42:19 Re: Use extended statistics to estimate (Var op Var) clauses