postgresql/contrib/adminpack
Tom Lane 3a2d636598 Fix potentially-unportable code in contrib/adminpack.
Spelling access(2)'s second argument as "2" is just horrid.
POSIX makes no promises as to the numeric values of W_OK and related
macros.  Even if it accidentally works as intended on every supported
platform, it's still unreadable and inconsistent with adjacent code.

In passing, don't spell "NULL" as "0" either.  Yes, that's legal C;
no, it's not project style.

Back-patch, just in case the unportability is real and not theoretical.
(Most likely, even if a platform had different bit assignments for
access()'s modes, there'd not be an observable behavior difference
here; but I'm being paranoid today.)
2018-04-15 13:02:11 -04:00
..
expected Support new default roles with adminpack 2018-04-06 14:47:10 -04:00
sql Support new default roles with adminpack 2018-04-06 14:47:10 -04:00
.gitignore adminpack: Add test suite 2017-09-14 22:22:59 -04:00
Makefile Support new default roles with adminpack 2018-04-06 14:47:10 -04:00
adminpack--1.0--1.1.sql Support new default roles with adminpack 2018-04-06 14:47:10 -04:00
adminpack--1.0.sql Throw a useful error message if an extension script file is fed to psql. 2011-10-12 15:45:03 -04:00
adminpack.c Fix potentially-unportable code in contrib/adminpack. 2018-04-15 13:02:11 -04:00
adminpack.control Support new default roles with adminpack 2018-04-06 14:47:10 -04:00