Thread: pgsql: Move relpath() to libpgcommon

pgsql: Move relpath() to libpgcommon

From
Alvaro Herrera
Date:
Move relpath() to libpgcommon

This enables non-backend code, such as pg_xlogdump, to use it easily.
The previous location, in src/backend/catalog/catalog.c, made that
essentially impossible because that file depends on many backend-only
facilities; so this needs to live separately.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/a73018392636ce832b09b5c31f6ad1f18a4643ea

Modified Files
--------------
src/backend/Makefile                   |    8 +-
src/backend/access/rmgrdesc/smgrdesc.c |    1 +
src/backend/access/rmgrdesc/xactdesc.c |    1 +
src/backend/access/transam/xlogutils.c |    1 +
src/backend/catalog/catalog.c          |  140 +---------------------------
src/backend/commands/tablespace.c      |    1 +
src/backend/storage/buffer/bufmgr.c    |    1 +
src/backend/storage/buffer/localbuf.c  |    1 +
src/backend/storage/file/fd.c          |    1 +
src/backend/storage/file/reinit.c      |    1 +
src/backend/storage/smgr/md.c          |    1 +
src/backend/utils/adt/dbsize.c         |    1 +
src/backend/utils/adt/misc.c           |    1 +
src/backend/utils/cache/relcache.c     |    1 +
src/common/Makefile                    |   11 ++-
src/common/relpath.c                   |  162 ++++++++++++++++++++++++++++++++
src/include/catalog/catalog.h          |   20 ----
src/include/common/relpath.h           |   41 ++++++++
src/tools/msvc/Mkvcbuild.pm            |   11 ++-
19 files changed, 237 insertions(+), 168 deletions(-)


Re: pgsql: Move relpath() to libpgcommon

From
Tom Lane
Date:
Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
> Move relpath() to libpgcommon

Buildfarm member frogmouth has a problem with this patch...
looks like some confusion about how to do asserts.

            regards, tom lane


Re: pgsql: Move relpath() to libpgcommon

From
Alvaro Herrera
Date:
Tom Lane wrote:
> Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
> > Move relpath() to libpgcommon
>
> Buildfarm member frogmouth has a problem with this patch...
> looks like some confusion about how to do asserts.

Looks like both mingw and cygwin didn't like it.  I have pushed a patch,
while regretting not having yet followed Andrew's instructions on how to
create a proper mingw testing environment locally.

--
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services