pgsql: Clean up some copied-and-pasted code in pg_upgrade. - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Clean up some copied-and-pasted code in pg_upgrade.
Date
Msg-id E1PRUxK-0002Hk-Pq@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Clean up some copied-and-pasted code in pg_upgrade.

1. Don't reimplement S_ISDIR() and S_ISREG() badly.
2. Don't reimplement access() badly.

This code appears to have been copied from ancient versions of the
corresponding backend routines, and not patched to incorporate subsequent
fixes (see my commits of 2008-03-31 and 2010-01-14 respectively).
It might be a good idea to change it to just *call* those routines,
but for now I'll just transpose these fixes over.

Branch
------
master

Details
-------
http://git.postgresql.org/gitweb?p=postgresql.git;a=commitdiff;h=3864afa1d1478f7a76fde1ea160a7bc8f5d5b203

Modified Files
--------------
contrib/pg_upgrade/exec.c |   69 +++-----------------------------------------
contrib/pg_upgrade/file.c |    4 +-
2 files changed, 7 insertions(+), 66 deletions(-)


pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: pgsql: Provide a complete set of file-permission-bit macros in win32.h.
Next
From: Tom Lane
Date:
Subject: pgsql: Make S_IRGRP etc available in mingw builds as well as MSVC.