Re: Dump/Restore of non-default PKs

From: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
To: Simon Riggs <simon(dot)riggs(at)enterprisedb(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Dump/Restore of non-default PKs
Date: 2022-04-22 13:38:35
Message-ID: 29672d7c-7000-2467-a99b-33a9a79d55ea@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 21.04.22 13:43, Simon Riggs wrote:
>> 1. create the table without primary key
>> 2. create the index
>> 3. attach the index as primary key constraint
>>
>> That doesn't sound attractive.
> Can you explain what you find unattractive about it?

Well, if I want to create a table with a primary key, the established
way is to say "primary key", not to have to assemble it from multiple
pieces.

I think this case is very similar to exclusion constraints, which also
have syntax to specify the index access method.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bharath Rupireddy 2022-04-22 13:47:37 Re: pg_receivewal fail to streams when the partial file to write is not fully initialized present in the wal receiver directory
Previous Message Bharath Rupireddy 2022-04-22 13:37:16 Re: pg_walcleaner - new tool to detect, archive and delete the unneeded wal files (was Re: pg_archivecleanup - add the ability to detect, archive and delete the unneeded wal files on the primary)