From: | Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com> |
---|---|
To: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | static assert cleanup |
Date: | 2022-12-09 07:46:58 |
Message-ID: | 941a04e7-dd6f-c0e4-8cdf-a33b3338cbda@enterprisedb.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
A number of static assertions could be moved to better places.
We first added StaticAssertStmt() in 2012, which required all static
assertions to be inside function bodies. We then added
StaticAssertDecl() in 2020, which enabled static assertions on file
level. We have a number of calls that were stuck in not-really-related
functions for this historical reason. This patch set cleans that up.
0001-Update-static-assert-usage-comment.patch
This updates the usage information in c.h to be more current and precise.
0002-Move-array-size-related-static-assertions.patch
This moves some obviously poorly placed ones.
0003-Move-some-static-assertions-to-better-places.patch
This moves some that I thought were suboptimally placed but it could be
debated or refined.
0004-Use-StaticAssertDecl-where-possible.patch
This just changes some StaticAssertStmt() to StaticAssertDecl() where
appropriate. It's optional.
Attachment | Content-Type | Size |
---|---|---|
0001-Update-static-assert-usage-comment.patch | text/plain | 4.2 KB |
0002-Move-array-size-related-static-assertions.patch | text/plain | 4.1 KB |
0003-Move-some-static-assertions-to-better-places.patch | text/plain | 10.4 KB |
0004-Use-StaticAssertDecl-where-possible.patch | text/plain | 9.9 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Masahiko Sawada | 2022-12-09 08:00:58 | Re: Perform streaming logical transactions by background workers and parallel apply |
Previous Message | Amit Kapila | 2022-12-09 07:14:05 | Re: Perform streaming logical transactions by background workers and parallel apply |