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 1sFI3a-000rss-8g for pgsql-general@arkaria.postgresql.org; Thu, 06 Jun 2024 18:41:51 +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 1sFI3X-002lBZ-6I for pgsql-general@arkaria.postgresql.org; Thu, 06 Jun 2024 18:41:48 +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 1sFI3W-002lBR-Rf for pgsql-general@lists.postgresql.org; Thu, 06 Jun 2024 18:41:47 +0000 Received: from smtp.burggraben.net ([2a01:4f8:140:510a::3]) by makus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sFI3U-0002S3-Tz for pgsql-general@lists.postgresql.org; Thu, 06 Jun 2024 18:41:46 +0000 Received: from sciurus.exwg.net (unknown [IPv6:2001:470:7120:1:826d:97ff:fe4b:c7af]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "sciurus.exwg.net", Issuer "R3" (verified OK)) by smtp.burggraben.net (Postfix) with ESMTPS id C4F05C01100; Thu, 6 Jun 2024 20:41:40 +0200 (CEST) Received: by sciurus.exwg.net (Postfix, from userid 1000) id 22F4D4314B9F; Thu, 6 Jun 2024 20:41:40 +0200 (CEST) Date: Thu, 6 Jun 2024 20:41:40 +0200 From: Christoph Moench-Tegeder To: David Barbour Cc: pgsql-general@lists.postgresql.org Subject: Re: Oracle to Postgres - Transform Hash Partition Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/2.2.12 (2023-09-09) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk ## David Barbour (dbarbour@istation.com): > Now I need to 'attach' the original table. The problem I'm running into is > there are no good examples of how to define the values. The syntax is the same as with CREATE TABLE ... PARTITION OF, e.g. ALTER TABLE parent ATTACH TABLE part FOR VALUES WITH (MODULUS m, REMAINDER r); > Here's an example: > alter table idev.assessment_result_2023_dab_part > attach partition idev.assessment_result_2023_dab for values with(modulus 8, > remainder 1) to (modulus 8, remainder 7) There's only one (modulus, remainder) tuple in the partition bound definition for hash partitions, and always only one partition bound specification per partition. Maybe what you actually want is a DEFAULT partition (specified as PARTITION OF parent DEFAULT), or maybe a completely different approach? Regards, Christoph -- Spare Space.