Commit 955557dd authored by Heikki Linnakangas's avatar Heikki Linnakangas

Move rbtree.c from src/backend/utils/misc to src/backend/lib.

We have other general-purpose data structures in src/backend/lib, so it
seems like a better home for the red-black tree as well.
parent 7f0dccae
...@@ -12,6 +12,6 @@ subdir = src/backend/lib ...@@ -12,6 +12,6 @@ subdir = src/backend/lib
top_builddir = ../../.. top_builddir = ../../..
include $(top_builddir)/src/Makefile.global include $(top_builddir)/src/Makefile.global
OBJS = ilist.o binaryheap.o pairingheap.o stringinfo.o OBJS = ilist.o binaryheap.o pairingheap.o rbtree.o stringinfo.o
include $(top_srcdir)/src/backend/common.mk include $(top_srcdir)/src/backend/common.mk
...@@ -5,6 +5,8 @@ binaryheap.c - a binary heap ...@@ -5,6 +5,8 @@ binaryheap.c - a binary heap
pairingheap.c - a pairing heap pairingheap.c - a pairing heap
rbtree.c - a red-black tree
ilist.c - single and double-linked lists. ilist.c - single and double-linked lists.
stringinfo.c - an extensible string type stringinfo.c - an extensible string type
...@@ -19,6 +21,3 @@ while the binary heap works with plain Datums or pointers. ...@@ -19,6 +21,3 @@ while the binary heap works with plain Datums or pointers.
The linked-lists in ilist.c can be embedded directly into other structs, as The linked-lists in ilist.c can be embedded directly into other structs, as
opposed to the List interface in nodes/pg_list.h. opposed to the List interface in nodes/pg_list.h.
In addition to these, there is an implementation of a Red-Black tree in
src/backend/utils/adt/rbtree.c.
...@@ -20,13 +20,13 @@ ...@@ -20,13 +20,13 @@
* Copyright (c) 2009-2014, PostgreSQL Global Development Group * Copyright (c) 2009-2014, PostgreSQL Global Development Group
* *
* IDENTIFICATION * IDENTIFICATION
* src/backend/utils/misc/rbtree.c * src/backend/lib/rbtree.c
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
#include "postgres.h" #include "postgres.h"
#include "utils/rbtree.h" #include "lib/rbtree.h"
/* /*
......
...@@ -14,7 +14,7 @@ include $(top_builddir)/src/Makefile.global ...@@ -14,7 +14,7 @@ include $(top_builddir)/src/Makefile.global
override CPPFLAGS := -I. -I$(srcdir) $(CPPFLAGS) override CPPFLAGS := -I. -I$(srcdir) $(CPPFLAGS)
OBJS = guc.o help_config.o pg_rusage.o ps_status.o rbtree.o \ OBJS = guc.o help_config.o pg_rusage.o ps_status.o \
superuser.o timeout.o tzparser.o superuser.o timeout.o tzparser.o
# This location might depend on the installation directories. Therefore # This location might depend on the installation directories. Therefore
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
#include "access/itup.h" #include "access/itup.h"
#include "fmgr.h" #include "fmgr.h"
#include "storage/bufmgr.h" #include "storage/bufmgr.h"
#include "utils/rbtree.h" #include "lib/rbtree.h"
/* /*
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* Copyright (c) 2009-2014, PostgreSQL Global Development Group * Copyright (c) 2009-2014, PostgreSQL Global Development Group
* *
* IDENTIFICATION * IDENTIFICATION
* src/include/utils/rbtree.h * src/include/lib/rbtree.h
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment