Skip site navigation (1) Skip section navigation (2)

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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Clean up some copied-and-pasted code in pg_upgrade.
Date: 2010-12-11 19:18:06
Message-ID: (view raw, whole thread or download thread mbox)
Lists: 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.



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

Next:From: Heikki LinnakangasDate: 2010-12-11 21:03:23
Subject: Re: [COMMITTERS] pgsql: Reduce spurious Hot Standby conflicts from never-visible records
Previous:From: Tom LaneDate: 2010-12-11 18:11:29
Subject: pgsql: Provide a complete set of file-permission-bit macros inwin32.h.

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group