From: John Scalia <jayknowsunix@gmail.com>
To: pgsql-admin <pgsql-admin@postgresql.org>
Subject: More on my partitioning problem
Date: Mon, 2 Nov 2020 07:40:26 -0500
Message-ID: <A74FFBFA-14BE-4FEB-9B0C-AD3AA056BF5C@gmail.com> (raw)
Hi guys, again,
Laurenz’s suggestion to use create table like including all did not work, due to the fact that the partitioning key is not part of the original base table’s primary key. I had also forgotten about using the LIKE construct. So, thanks Laurenz, but this also means I cannot use INCLUDING INDEXES, so I have to recreate all the indexes again on the new partitioned base table,, but I’m having an issue with the new table’s primary key.
I created a UNIQUE INDEX on the new base table using the original primary key and the partitioning key. So far, so good. But doing an ALTER TABLE ADD PRIMARY KEY USING INDEX, is not supported. So. being that I already have a unique index here, does it really matter if I do not declare a primary key here? Otherwise, how would I go about creating a primary key on this partitioned table?
—
Jay
Sent from my iPad
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: jayknowsunix@gmail.com
Subject: Re: More on my partitioning problem
In-Reply-To: <A74FFBFA-14BE-4FEB-9B0C-AD3AA056BF5C@gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox