Re: Add SPLIT PARTITION/MERGE PARTITIONS commands - Mailing list pgsql-hackers

From Pavel Borisov
Subject Re: Add SPLIT PARTITION/MERGE PARTITIONS commands
Date
Msg-id CALT9ZEHhVt-i1vGL_eCfNqAisTiC6VaM6U-fxP3kD306uPLEcw@mail.gmail.com
Whole thread Raw
In response to Re: Add SPLIT PARTITION/MERGE PARTITIONS commands  (stephane tachoires <stephane.tachoires@gmail.com>)
List pgsql-hackers
Hi, Alexander!

On Mon, 19 Aug 2024 at 02:24, Alexander Korotkov <aekorotkov@gmail.com> wrote:
On Sat, Aug 10, 2024 at 6:57 PM Dmitry Koval <d.koval@postgrespro.ru> wrote:
> > Probably
> > QueryCompletion struct fits this purpose best from the existing
> > parameters.  Attached draft patch implements returning oid of newly
> > created relation as part of QueryCompletion.  Thoughts?
>
> I agree, returning the oid of the newly created relation is the best way
> to solve the problem.
> (Excuse me, I won't have access to a laptop for the next week - and
> won't be able to look at the source code).

Thank you for your feedback.  Although, I decided QueryCompletion is
not a good place for this new field.  It looks more appropriate to
place it to TableLikeClause, which already contains one relation oid
inside.  The revised patch is attached.

I've looked at the patch v2. Remembering the OID of a relation newly created with LIKE in TableLikeClause seems good to me.
Check-world passes sucessfully.

Shouldn't we also modify the TableLikeClause node in gram.y accordingly?

For the comments: 
Put the Oid  -> Store the OID
so caller might use it -> for the caller to use it. 
(Maybe also caller -> table create function)

Regards, 
Pavel Borisov
Supabase

pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: CREATE SUBSCRIPTION - add missing test case
Next
From: Dean Rasheed
Date:
Subject: Re: Virtual generated columns