You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Tom Lane
a2a8acd152
Produce compiler errors if errno is referenced inside elog/ereport calls.
...
It's often unsafe to reference errno within an elog/ereport call, because
there are a lot of sub-functions involved and they might not all preserve
errno. (This is why we support the %m format spec: it works off a value
of errno captured before we execute any potentially-unsafe functions in
the arguments.) Therefore, we have a project policy not to use errno
there.
This patch adds a hack to cause an (admittedly obscure) compiler error
for such unsafe usages. With the current code, the error will only be seen
on Linux, macOS, and FreeBSD, but that should certainly be enough to catch
mistakes in the buildfarm if they somehow get missed earlier.
In addition, fix some places in src/common/exec.c that trip the error.
I think these places are actually all safe, but it's simple enough to
avoid the error by capturing errno manually, and doing so is good
future-proofing in case these call sites get any more complicated.
Thomas Munro (exec.c fixes by me)
Discussion: https://postgr.es/m/2975.1526862605@sss.pgh.pa.us
7 years ago
..
access
Flip argument order in XLogSegNoOffsetToRecPtr
8 years ago
bootstrap
Rationalize handling of array type names in bootstrap data.
8 years ago
catalog
Bump catalog version for recent toast table additions
8 years ago
commands
Refactor cluster_rel() to handle more options
8 years ago
common
Remove support for tls-unique channel binding.
8 years ago
datatype
Update copyright for 2018
8 years ago
executor
Fix run-time partition pruning for appends with multiple source rels.
8 years ago
fe_utils
Post-feature-freeze pgindent run.
8 years ago
foreign
Allow insert and update tuple routing and COPY for foreign tables.
8 years ago
jit
Make PGJIT_* macros safer.
8 years ago
lib
Fix a boatload of typos in C comments.
8 years ago
libpq
Remove support for tls-unique channel binding.
8 years ago
mb
Fix a boatload of typos in C comments.
8 years ago
nodes
Fix run-time partition pruning for appends with multiple source rels.
8 years ago
optimizer
Fix bugs with degenerate window ORDER BY clauses in GROUPS/RANGE mode.
8 years ago
parser
Fix INSERT ON CONFLICT UPDATE through a view that isn't just SELECT *.
8 years ago
partitioning
Fix run-time partition pruning for appends with multiple source rels.
8 years ago
port
Fix misc typos, mostly in comments.
8 years ago
portability
Update copyright for 2018
8 years ago
postmaster
Add comment explaining BGWORKER_BYPASS_ALLOWCONN
8 years ago
regex
Update copyright for 2018
8 years ago
replication
Add subtransaction handling for table synchronization workers.
8 years ago
rewrite
Revert MERGE patch
8 years ago
snowball
Update copyright for 2018
8 years ago
statistics
Update copyright for 2018
8 years ago
storage
Add missing header include to pmsignal.h.
8 years ago
tcop
Post-feature-freeze pgindent run.
8 years ago
tsearch
Post-feature-freeze pgindent run.
8 years ago
utils
Produce compiler errors if errno is referenced inside elog/ereport calls.
7 years ago
.gitignore
…
Makefile
Rearrange makefile rules for running Gen_fmgrtab.pl.
8 years ago
c.h
Distinguish printf-like functions that support %m from those that don't.
7 years ago
fmgr.h
Add expression compilation support to LLVM JIT provider.
8 years ago
funcapi.h
Support INOUT arguments in procedures
8 years ago
getaddrinfo.h
Update copyright for 2018
8 years ago
getopt_long.h
Update copyright for 2018
8 years ago
miscadmin.h
Allow group access on PGDATA
8 years ago
pg_config.h.in
Distinguish printf-like functions that support %m from those that don't.
7 years ago
pg_config.h.win32
LLVMJIT: Adapt to API changes in gdb and perf support.
8 years ago
pg_config_ext.h.in
…
pg_config_ext.h.win32
…
pg_config_manual.h
Update copyright for 2018
8 years ago
pg_getopt.h
Update copyright for 2018
8 years ago
pg_trace.h
Update copyright for 2018
8 years ago
pgstat.h
Add wait event for fsync of WAL segments
8 years ago
pgtar.h
Update copyright for 2018
8 years ago
pgtime.h
Update copyright for 2018
8 years ago
port.h
Fix a boatload of typos in C comments.
8 years ago
postgres.h
Detoast plpgsql variables if they might live across a transaction boundary.
8 years ago
postgres_ext.h
…
postgres_fe.h
Update copyright for 2018
8 years ago
rusagestub.h
Update copyright for 2018
8 years ago
windowapi.h
Update copyright for 2018
8 years ago