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 1rwOPW-001Kxf-Ka for pgsql-hackers@arkaria.postgresql.org; Mon, 15 Apr 2024 15:38:22 +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 1rwOPU-00DutU-Vv for pgsql-hackers@arkaria.postgresql.org; Mon, 15 Apr 2024 15:38:20 +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 1rwOPU-00DutM-MI for pgsql-hackers@lists.postgresql.org; Mon, 15 Apr 2024 15:38:20 +0000 Received: from mail-ed1-x52c.google.com ([2a00:1450:4864:20::52c]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rwOPS-002z6f-6a for pgsql-hackers@lists.postgresql.org; Mon, 15 Apr 2024 15:38:19 +0000 Received: by mail-ed1-x52c.google.com with SMTP id 4fb4d7f45d1cf-56e1f3462caso4039244a12.3 for ; Mon, 15 Apr 2024 08:38:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713195497; x=1713800297; darn=lists.postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=UdIMY8wVhkvtrW1SoTW0WOFNYCROZMJqFgFA0ohr8Jc=; b=IKKimCtafm3dfBOjb2wFTL9VzVmnouLXT4J6+SDo7LDWgkw5SmUz+yedR5qKV8luo9 kc8MJ9BQdpPXLaun3TXFheNE2HH2QyA0Hl6CSGgwor1A2EhsTKm5YTVHGcLBHaMSDjl0 e1pZFIc+Wj3yRHdNREa05Qn45oR54dujfDfWlf75frbq5aAvbACDxL9HCMAxdm3SK/Rc Z0ot8aCVbfwGfbRV5p0yOQTCxJK8ana+ovPJ3MGfErfsz0nl+9uUT8Sv1mgPjgjv7UDL 9GX9OBRUfVE/t4WD6xPh5YMQ8QHC+da0CWFdBzKF6UrxCChFUu3/4rXRJQd7ofrO18hO O/4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713195497; x=1713800297; h=content-transfer-encoding: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=UdIMY8wVhkvtrW1SoTW0WOFNYCROZMJqFgFA0ohr8Jc=; b=EN49xxiTOjK8OrxQX2DEebsCoL7te/HCSzqGTiO1izMnK8Ehq6ZiWfHkuZSpBLtv7y PzByupgeKMwsQkpG0V8s5p9S5uzaGoEdKdYa/2F1kHMAdudyPKBNUCWuw7QuIhtwdwsE VHGjxi1zFrL9Kv0Aff703EXP0if/KW4d1RdhhmGJfD/nWQRJvpodoq8pRjKou9chKA2l tqB7C/CH+Cj8cYUnkXp04PMrxYo4Jge6lVAQhojBvHnQVJHm8fQqMXTYcMRgjaP2kMw1 fhIbtY2q1yeGBN8da9l1eo/XQ6yTZ/wTebpxO0KXs3HVb/gl2pteIYBBc8vR1TsUXhoS 4AKA== X-Forwarded-Encrypted: i=1; AJvYcCVc+ohzSkolKoR0Coeb91w1ShXagTY9LI7wRg2dk1UUKuH8WfWE2G3KCpSC0CPclMjyVj6XpM6/tQdhq2ywHgKXpFOiy24g0x/RXU+H0cOpjDqG X-Gm-Message-State: AOJu0Ywt6IpLts8P2qtrssxPZk0oqww9+bpk0T0qWGPS+L0whm6FcayX BWbOtcYyEF0mkvD5NI9JwFD82fRYCRHwoZrWPsC8c0bOMx9a/4irEF3u+zgC25lgmzaS3FtDVJX ySiDoEG1Fr7dsGeworA3p9fGEV0g= X-Google-Smtp-Source: AGHT+IHn7TzvxyiRc7PZOgfHVcx3gf2GFQBHjxO3RKavsaKQDSoEksWzsV2T6TzkB+fIaozzZ/Tug6CfR5UztM7OIww= X-Received: by 2002:a17:906:134f:b0:a51:d742:b390 with SMTP id x15-20020a170906134f00b00a51d742b390mr6880480ejb.30.1713195496514; Mon, 15 Apr 2024 08:38:16 -0700 (PDT) MIME-Version: 1.0 References: <86bfd241-a58c-479a-9a72-2c67a02becf8@postgrespro.ru> <0f655bcd-6487-4179-f9cf-c248efbad510@gmail.com> <7edb8a57-5e50-dd77-7953-454d6686779e@gmail.com> In-Reply-To: <7edb8a57-5e50-dd77-7953-454d6686779e@gmail.com> From: Robert Haas Date: Mon, 15 Apr 2024 11:38:04 -0400 Message-ID: Subject: Re: Add SPLIT PARTITION/MERGE PARTITIONS commands To: Alexander Lakhin Cc: Alexander Korotkov , Dmitry Koval , PostgreSQL Hackers Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, Apr 15, 2024 at 11:00=E2=80=AFAM Alexander Lakhin wrote: > Initially I was confused by that message, because of: > CREATE TABLE t (i int) PARTITION BY RANGE (i); > CREATE FOREIGN TABLE ftp_0_1 PARTITION OF t > FOR VALUES FROM (0) TO (1) > SERVER loopback OPTIONS (table_name 'lt_0_1'); > CREATE FOREIGN TABLE ftp_1_2 PARTITION OF t > FOR VALUES FROM (1) TO (2) > SERVER loopback OPTIONS (table_name 'lt_1_2'); > ALTER TABLE t MERGE PARTITIONS (ftp_0_1, ftp_1_2) INTO ftp_0_2; > ERROR: "ftp_0_1" is not a table > (Isn't a foreign table a table?) I agree that this can be confusing, but a patch that is about adding SPLIT and MERGE PARTITION operations cannot decide to also invent a new error message phraseology and use it only in one place. We need to maintain consistency across the whole code base. --=20 Robert Haas EDB: http://www.enterprisedb.com