Search Postgresql Archives

Re: On partitioning, PKs and FKs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The docs are pretty clear that all constraints must have the partition key as part of the key, and PK is most certainly a constraint.

I welcome a counter-example.

On 7/8/21 10:23 AM, Alban Hertroys wrote:
On 2021-07-08 13:30, Ron wrote:
> Thus, the bigTable PK must be on id, columnX, (No, I don't like it
> either.)

That's not entirely true. You can keep the PK on id if you additionally
create a unique constraint on (id, columnX).

That way, you can at least be certain that the uniqueness of the PK
remains in-tact, even if that is a surrogate key that has nothing to do
with the uniqueness of the actual records.

Regards,

Alban Hertroys.


Alban Hertroys    

 

   

Apollo Tyres (NL) B.V.
Ir. E.L.C. Schiffstraat 370, 7547 RD Enschede, The Netherlands
+31 (0)53 4888 776

alban.hertroys@xxxxxxxxxxxxxxx
Chamber of Commerce number: 34223268

CIN: L25111KL1972PLC002449

Registered Office: Apollo Tyres Ltd, 3rd Floor, Areekal Mansion, Panampilly Nagar, Kochi  682036, India



Disclaimer:

The information contained in this e-mail is intended solely for the use of the individual or entity to whom it is addressed. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or action in relation to the contents of this information is strictly prohibited and may be unlawful and request you to delete this message and any attachments and advise the sender by return e-mail. The confidentiality of this message is not warranted. Apollo Tyres and its subsidiaries rule out any and every liability resulting from this or any other electronic transmiss

--
Angular momentum makes the world go 'round.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux