Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sgitj-006iZh-0g for pgsql-hackers@arkaria.postgresql.org; Wed, 21 Aug 2024 10:49:03 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1sgith-009efj-6q for pgsql-hackers@arkaria.postgresql.org; Wed, 21 Aug 2024 10:49:01 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sgitg-009efa-T8 for pgsql-hackers@lists.postgresql.org; Wed, 21 Aug 2024 10:49:01 +0000 Received: from mail-ej1-x630.google.com ([2a00:1450:4864:20::630]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sgite-000iUD-Vk for pgsql-hackers@lists.postgresql.org; Wed, 21 Aug 2024 10:49:00 +0000 Received: by mail-ej1-x630.google.com with SMTP id a640c23a62f3a-a8643a6bd55so246300966b.3 for ; Wed, 21 Aug 2024 03:48:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724237337; x=1724842137; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=Aio/m8wRY8fUGGDDYjfD6vWSJJp9cvCYRh/UNwqQWs8=; b=TAphS+TuLkRiu4jCMMt5lf67PhZs0cpPJ0uniLXs7OSqxYxgI2uLKMvYTKr7/ka+2G M5iOMsyp1WpdBeEtUmo4BsVeX3WujKDfSNTwWq0pKTAnb0LOaESKvHPl1ZJ7a41z+7BR p3C1jjQTjcUTP1y8ZjaTbM8TYt6LabcX/5e/LgUE43SlyZzFieKrGmMf/Ga2r90LD3G7 C3ws5hRqmZ8H7c6E5v/K48h0a9MGWj3JfBjOFTcrX4YtXoo9pbGI24j7eFVLkoYqi1R0 YWOTuYgKYDzbB3XbeICJER6XDc6PKt/SJz9FcQUxYDOQccq3BSFLaPiXP037t4qf2P22 lLrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724237337; x=1724842137; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Aio/m8wRY8fUGGDDYjfD6vWSJJp9cvCYRh/UNwqQWs8=; b=Jewo6k79LDKyrtaEFiSPf5ntbwpm/Bsz6DK1GH9+bgbMVel22nQ5YMGsoqkJdw+SYB BSrCb5+7B10h0hag+L63Iuag5C9XjdSKBL2PTM6NCdI9knwEcfJnAmyWopEBjEQXki+f t4SomT1C8Wk4ov/IxwU9LkQp7rT/IJvxOPT43dO5xevmGyWiBlnqael23xjN8ObCa1fl Fmzl8wjwAcTFcOk7PARU8o5t1WkN3Ji4VQVRfdgJmOXHf+BpTHrhmva5K+7Yg0rXu1t4 hnkiY3Ki2WzZMRtCwtgLHyQwx/Pz5uPovLFhkplQwWYLlq13EZqSjcrJzzU6QlWeRm9u Bryg== X-Forwarded-Encrypted: i=1; AJvYcCVTQ+Jo2TbxhCKz4v1Nh4TmjlBllrErMp//GnqfD35BczhQxXYzIAUBEBtkT4IuJZ4B5pgsYQPXrHa2yKvT@lists.postgresql.org X-Gm-Message-State: AOJu0YxoQNgyMX0njEzKmgUJPW82XKXVKwBKw5EoY+8QLuZmjCoDEfH4 1NcA7UgAvABzrFa0tEnVy/ZANPvcXiOPC8cW0T+4LjZlSan9UlTfWhL6yK8CS2uA3yIBZVYKQHK q34Z/HI0bPTvBnVWIajtyXH0CxU4= X-Google-Smtp-Source: AGHT+IHeu+36DT9z62AE/yDi8wpi7DdNRnigqG9wu5jdCY6ckv39owXwWX8Gc6EI9bmKbpGVtx1To7NqgHX/DvgBw9U= X-Received: by 2002:a17:906:794a:b0:a7a:a0c2:8be9 with SMTP id a640c23a62f3a-a866f29303fmr132862766b.18.1724237336454; Wed, 21 Aug 2024 03:48:56 -0700 (PDT) MIME-Version: 1.0 References: <171085360143.2046436.7217841141682511557.pgcf@coridan.postgresql.org> <171085858750.2046434.12246066729700037354.pgcf@coridan.postgresql.org> <909e16b4-9eda-435c-b033-8294ae4adc05@postgrespro.ru> <3a4b9c1c-3edf-4e29-9629-b4113aefb0f3@postgrespro.ru> <20240808171351.a9.nmisch@google.com> <19c1e04c-2012-4475-8460-821dd633a6ce@postgrespro.ru> <768cbb42-d3f8-45de-89ad-72861f078dc2@postgrespro.ru> In-Reply-To: From: Pavel Borisov Date: Wed, 21 Aug 2024 14:48:45 +0400 Message-ID: Subject: Re: Add SPLIT PARTITION/MERGE PARTITIONS commands To: Alexander Korotkov Cc: Dmitry Koval , Noah Misch , pgsql-hackers@lists.postgresql.org Content-Type: multipart/alternative; boundary="000000000000f2af4706202f49ca" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000f2af4706202f49ca Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, Alexander! On Mon, 19 Aug 2024 at 02:24, Alexander Korotkov wrote: > On Sat, Aug 10, 2024 at 6:57=E2=80=AFPM Dmitry Koval > 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 wa= y > > 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 --000000000000f2af4706202f49ca Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi, Alexander!

On Mon, 19 Aug 2024 at 02:2= 4, Alexander Korotkov <aekorotko= v@gmail.com> wrote:
On Sat, Aug 10, 2024 at 6:57=E2=80=AFPM Dmitry Koval <d.koval@postgrespro.ru= > wrote:
> > Probably
> > QueryCompletion struct fits this purpose best from the existing > > parameters.=C2=A0 Attached draft patch implements returning oid o= f newly
> > created relation as part of QueryCompletion.=C2=A0 Thoughts?
>
> I agree, returning the oid of the newly created relation is the best w= ay
> to solve the problem.
> (Excuse me, I won't have access to a laptop for the next week - an= d
> won't be able to look at the source code).

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

I've looked at the patch v2. Remembering the=C2=A0OID of a relati= on newly created with LIKE in TableLikeClause seems good to me.
C= heck-world passes sucessfully.

Shouldn't we al= so modify the TableLikeClause node in gram.y accordingly?

For the comments:=C2=A0
Put the Oid=C2=A0 -> Store the= OID
so caller might use it -> for the caller to use it.=C2=A0=
(Maybe also caller -> table create function)
Regards,=C2=A0
Pavel Borisov
Supabase
--000000000000f2af4706202f49ca--