Re: PostgreSQL 15.9 Update: Partitioned tables with foreign key constraints

2024-11-19 Thread Alvaro Herrera
Hi Paul, On 2024-Nov-19, Paul Foerster wrote: > the PostgreSQL 15.9 release notes instruct to look out for especially > detached partitions with foreign key constraints. I'm in the process > of updating our databases from 15.8 to 15.9 now and found a case where > the select statement returns a co

Re: PostgreSQL 15.10 update corrective action for ATTACH PARTITION/DETACH PARTITION

2024-11-29 Thread Alvaro Herrera
Hello, On 2024-Nov-29, Paul Foerster wrote: > > On 29 Nov 2024, at 18:15, Alvaro Herrera wrote: > > This reports case 2 as OK and case 1 as bogus, as should be. I tried > > adding more partitions and this seems to hold correctly. I was afraid > > though that this wo

Re: Postgres do not support tinyint?

2025-01-08 Thread Alvaro Herrera
On 2025-Jan-08, Igor Korot wrote: > Also - there are not too many records in that table... In that case, you've probably wasted more time on this discussion than the computer will ever save by storing a smaller column. -- Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.

Re: Postgres 17 domains with NOT NULL and pg_get_constraintdef()

2025-01-08 Thread Alvaro Herrera
On 2025-Jan-08, sham...@gmx.net wrote: Hello, > However, because the domain is defined with NOT NULL, this fails with > > > ERROR: invalid constraint type "n" > > with 17.2 on Windows and Linux. > > This is a result of storing the NOT NULL constraint in pg_constraint > and can easily be avoide

Re: PostgreSQL 15.10 update corrective action for ATTACH PARTITION/DETACH PARTITION

2025-05-27 Thread Alvaro Herrera
Hello, Belatedly, I came back to this issue in the release notes. Here's a query for correctly reporting the problem and not reporting the cases where there isn't a problem: SELECT conrelid::pg_catalog.regclass AS "constrained table", conname AS constraint, confrelid::pg_catalog.re

<    1   2   3   4