postgresql/src/backend
Tom Lane c5f11f9d19 Fix a number of places that were making file-type tests infelicitously.
The places that did, eg,
	(statbuf.st_mode & S_IFMT) == S_IFDIR
were correct, but there is no good reason not to use S_ISDIR() instead,
especially when that's what the other 90% of our code does.  The places
that did, eg,
	(statbuf.st_mode & S_IFDIR)
were flat out *wrong* and would fail in various platform-specific ways,
eg a symlink could be mistaken for a regular file on most Unixen.

The actual impact of this is probably small, since the problem cases
seem to always involve symlinks or sockets, which are unlikely to be
found in the directories that PG code might be scanning.  But it's
clearly trouble waiting to happen, so patch all the way back anyway.
(There seem to be no occurrences of the mistake in 7.4.)
2008-03-31 01:31:43 +00:00
..
access Move the HTSU_Result enum definition into snapshot.h, to avoid including 2008-03-26 21:10:39 +00:00
bootstrap Move the HTSU_Result enum definition into snapshot.h, to avoid including 2008-03-26 21:10:39 +00:00
catalog Reduce the need for frontend programs to include "postgres.h" by refactoring 2008-03-27 03:57:34 +00:00
commands Support statement-level ON TRUNCATE triggers. Simon Riggs 2008-03-28 00:21:56 +00:00
executor Support statement-level ON TRUNCATE triggers. Simon Riggs 2008-03-28 00:21:56 +00:00
lib Refactor backend makefiles to remove lots of duplicate code 2008-02-19 10:30:09 +00:00
libpq Simplify and standardize conversions between TEXT datums and ordinary C 2008-03-25 22:42:46 +00:00
main Refactor backend makefiles to remove lots of duplicate code 2008-02-19 10:30:09 +00:00
nodes Remove TypeName struct's timezone flag, which has been write-only storage 2008-03-21 22:41:48 +00:00
optimizer Revert my erroneous fix for Taiki Yamaguchi's DISTINCT MAX() bug. 2008-03-29 00:15:28 +00:00
parser Support statement-level ON TRUNCATE triggers. Simon Riggs 2008-03-28 00:21:56 +00:00
po Translation updates 2008-01-31 18:04:52 +00:00
port Add a new ereport auxiliary function errdetail_log(), which works the same as 2008-03-24 18:08:47 +00:00
postmaster Move the HTSU_Result enum definition into snapshot.h, to avoid including 2008-03-26 21:10:39 +00:00
regex Refactor backend makefiles to remove lots of duplicate code 2008-02-19 10:30:09 +00:00
rewrite Move the HTSU_Result enum definition into snapshot.h, to avoid including 2008-03-26 21:10:39 +00:00
snowball More README src cleanups. 2008-03-21 13:23:29 +00:00
storage Move the HTSU_Result enum definition into snapshot.h, to avoid including 2008-03-26 21:10:39 +00:00
tcop Rename snapmgmt.c/h to snapmgr.c/h, for consistency with other files. 2008-03-26 18:48:59 +00:00
tsearch Simplify and standardize conversions between TEXT datums and ordinary C 2008-03-25 22:42:46 +00:00
utils Fix a number of places that were making file-type tests infelicitously. 2008-03-31 01:31:43 +00:00
Makefile Enable probes to work with Mac OS X Leopard and other OSes that will 2008-03-17 19:44:41 +00:00
common.mk We need to rebuild objfiles.txt when one of the subdirectories' objfiles.txt 2008-03-17 18:24:56 +00:00
nls.mk Add a new ereport auxiliary function errdetail_log(), which works the same as 2008-03-24 18:08:47 +00:00