Re: More on my partitioning problem

Поиск
Список
Период
Сортировка
От John Scalia
Тема Re: More on my partitioning problem
Дата
Msg-id F3E3A375-CF42-4EFD-8C89-151953481360@gmail.com
обсуждение исходный текст
Ответ на Re: More on my partitioning problem  (Laurenz Albe <laurenz.albe@cybertec.at>)
Список pgsql-admin
Thank, Laurenz ( again ) don’t know why I didn’t think of that. 😎

Sent from my iPad

> On Nov 2, 2020, at 9:34 AM, Laurenz Albe <laurenz.albe@cybertec.at> wrote:
>
> On Mon, 2020-11-02 at 07:40 -0500, John Scalia wrote:
>> 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?
>
> Don't create a unique index and then use it to define a primary key constraint,
> create the primary key directly:
>
> ALTER TABLE part ADD PRIMARY KEY (id, part_key);
>
> Yours,
> Laurenz
> --
> Cybertec | https://www.cybertec-postgresql.com
>



В списке pgsql-admin по дате отправления:

Предыдущее
От: Laurenz Albe
Дата:
Сообщение: Re: More on my partitioning problem
Следующее
От: John Scalia
Дата:
Сообщение: Maybe a possible bug in the partitioning code?