postgresql/src/include
Peter Eisentraut 75f49221c2 Static assertions cleanup
Because we added StaticAssertStmt() first before StaticAssertDecl(),
some uses as well as the instructions in c.h are now a bit backwards
from the "native" way static assertions are meant to be used in C.
This updates the guidance and moves some static assertions to better
places.

Specifically, since the addition of StaticAssertDecl(), we can put
static assertions at the file level.  This moves a number of static
assertions out of function bodies, where they might have been stuck
out of necessity, to perhaps better places at the file level or in
header files.

Also, when the static assertion appears in a position where a
declaration is allowed, then using StaticAssertDecl() is more native
than StaticAssertStmt().

Reviewed-by: John Naylor <john.naylor@enterprisedb.com>
Discussion: https://www.postgresql.org/message-id/flat/941a04e7-dd6f-c0e4-8cdf-a33b3338cbda%40enterprisedb.com
2022-12-15 10:10:32 +01:00
..
access Static assertions cleanup 2022-12-15 10:10:32 +01:00
backup Reduce basebackup_sink.h inclusion footprint 2022-10-12 09:42:20 +02:00
bootstrap Harmonize more lexer function parameter names. 2022-09-22 13:27:16 -07:00
catalog Static assertions cleanup 2022-12-15 10:10:32 +01:00
commands Add grantable MAINTAIN privilege and pg_maintain role. 2022-12-13 17:33:28 -08:00
common Static assertions cleanup 2022-12-15 10:10:32 +01:00
datatype Fix overflow hazards in interval input and output conversions. 2022-04-02 16:12:29 -04:00
executor Rework query relation permission checking 2022-12-06 16:09:24 +01:00
fe_utils Revert 56-bit relfilenode change and follow-up commits. 2022-09-28 09:55:28 -04:00
foreign Harmonize more parameter names in bulk. 2022-09-20 13:09:30 -07:00
jit Add central declarations for dlsym()ed symbols 2022-07-17 17:23:42 -07:00
lib Fix wording in comment 2022-11-17 13:17:19 +01:00
libpq Rework memory contexts in charge of HBA/ident tokenization 2022-11-24 08:21:55 +09:00
mb Convert json_in and jsonb_in to report errors softly. 2022-12-11 11:28:15 -05:00
nodes Add grantable MAINTAIN privilege and pg_maintain role. 2022-12-13 17:33:28 -08:00
optimizer Rework query relation permission checking 2022-12-06 16:09:24 +01:00
parser Rework query relation permission checking 2022-12-06 16:09:24 +01:00
partitioning Move PartitioPruneInfo out of plan nodes into PlannedStmt 2022-12-01 12:56:21 +01:00
pch meson: Add support for building with precompiled headers 2022-10-06 17:19:30 -07:00
port mingw: Define PGDLLEXPORT as __declspec (dllexport) as done for msvc 2022-09-30 10:50:05 -07:00
portability Fix obsolete comments in instr_time.h. 2022-08-09 11:50:03 +12:00
postmaster Provide options for postmaster to kill child processes with SIGABRT. 2022-11-21 11:59:29 -05:00
regex Consistently use named parameters in regex code. 2022-09-19 15:10:24 -07:00
replication Avoid unnecessary streaming of transactions during logical replication. 2022-12-08 06:05:09 +05:30
rewrite Rework query relation permission checking 2022-12-06 16:09:24 +01:00
snowball Harmonize more parameter names in bulk. 2022-09-20 13:09:30 -07:00
statistics Harmonize more parameter names in bulk. 2022-09-20 13:09:30 -07:00
storage Static assertions cleanup 2022-12-15 10:10:32 +01:00
tcop Harmonize more parameter names in bulk. 2022-09-20 13:09:30 -07:00
tsearch Replace link to Hunspell with the current homepage 2022-11-21 23:25:48 +01:00
utils Convert a few more datatype input functions to report errors softly. 2022-12-14 19:42:05 -05:00
.gitignore Refactor dlopen() support 2018-09-06 11:33:04 +02:00
c.h Static assertions cleanup 2022-12-15 10:10:32 +01:00
fmgr.h Convert json_in and jsonb_in to report errors softly. 2022-12-11 11:28:15 -05:00
funcapi.h Remove compatibility declarations for InitMaterializedSRF() 2022-10-18 10:44:02 +09:00
getopt_long.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
Makefile Move gramparse.h to src/backend/parser 2022-09-14 10:57:13 +07:00
meson.build meson: Add basic PGXS compatibility 2022-12-06 18:56:46 -08:00
miscadmin.h Remove AssertArg and AssertState 2022-10-28 09:19:06 +02:00
pg_config.h.in Remove configure probe for sockaddr_in6 and require AF_INET6. 2022-08-26 10:18:30 +12:00
pg_config_ext.h.in Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
pg_config_ext.h.meson meson: Add initial version of meson based build system 2022-09-21 22:37:17 -07:00
pg_config_manual.h Remove our artificial PG_SOMAXCONN limit on listen queue length. 2022-08-23 10:15:06 -04:00
pg_getopt.h Apply PGDLLIMPORT markings broadly. 2022-04-08 08:16:38 -04:00
pg_trace.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
pgstat.h Generate pg_stat_get*() functions for databases using macros 2022-12-07 09:11:48 +09:00
pgtar.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
pgtime.h Harmonize more parameter names in bulk. 2022-09-20 13:09:30 -07:00
port.h pg_basebackup: Fix cross-platform tablespace relocation. 2022-10-21 08:21:55 -04:00
postgres.h Simplify our Assert infrastructure a little. 2022-10-10 15:16:56 -04:00
postgres_ext.h Move RelFileNumber declarations to common/relpath.h. 2022-09-27 12:01:57 -04:00
postgres_fe.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
windowapi.h Update copyright for 2022 2022-01-07 19:04:57 -05:00