]> granicus.if.org Git - postgresql/commitdiff
Move rbtree.c from src/backend/utils/misc to src/backend/lib.
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Mon, 22 Dec 2014 15:52:08 +0000 (17:52 +0200)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Mon, 22 Dec 2014 15:52:08 +0000 (17:52 +0200)
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.

src/backend/lib/Makefile
src/backend/lib/README
src/backend/lib/rbtree.c [moved from src/backend/utils/misc/rbtree.c with 99% similarity]
src/backend/utils/misc/Makefile
src/include/access/gin_private.h
src/include/lib/rbtree.h [moved from src/include/utils/rbtree.h with 98% similarity]

index b24ece68ad90f7dbbd2389f5d878038835e8dc40..949ee5e41d0e99ec87a6e352b2cfcc36ee0f7452 100644 (file)
@@ -12,6 +12,6 @@ subdir = src/backend/lib
 top_builddir = ../../..
 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
index 5f4038f08cd77a0e3b82d7a449ed7ff7c15f5912..2f16351849dff7b0e97d48c4c20ebec2647ea73c 100644 (file)
@@ -5,6 +5,8 @@ binaryheap.c - a binary heap
 
 pairingheap.c - a pairing heap
 
+rbtree.c - a red-black tree
+
 ilist.c - single and double-linked lists.
 
 stringinfo.c - an extensible string type
@@ -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
 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.
similarity index 99%
rename from src/backend/utils/misc/rbtree.c
rename to src/backend/lib/rbtree.c
index e3efd4c08bd49ee4633c6166554c1467c81d6fa9..a450aa959ee729e98f400585026941c736a4f395 100644 (file)
  * Copyright (c) 2009-2014, PostgreSQL Global Development Group
  *
  * IDENTIFICATION
- *       src/backend/utils/misc/rbtree.c
+ *       src/backend/lib/rbtree.c
  *
  *-------------------------------------------------------------------------
  */
 #include "postgres.h"
 
-#include "utils/rbtree.h"
+#include "lib/rbtree.h"
 
 
 /*
index c7b745e51319468954749dd317622561e1c07a4e..449d5b47ea2155542106a4d3ef5c94105e4f6dcd 100644 (file)
@@ -14,7 +14,7 @@ include $(top_builddir)/src/Makefile.global
 
 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
 
 # This location might depend on the installation directories. Therefore
index 3d46f20bb83d9f157dc1a4904ed997bbda5eca20..77f5ffd4bf0deba2550f8d2fc889c076c99d0cc4 100644 (file)
@@ -15,7 +15,7 @@
 #include "access/itup.h"
 #include "fmgr.h"
 #include "storage/bufmgr.h"
-#include "utils/rbtree.h"
+#include "lib/rbtree.h"
 
 
 /*
similarity index 98%
rename from src/include/utils/rbtree.h
rename to src/include/lib/rbtree.h
index 0c94151ce52ce8a1f90171154bbaecd3a786a130..e4a0f6381080920ab95a3a6be5f37573869bdaa3 100644 (file)
@@ -6,7 +6,7 @@
  * Copyright (c) 2009-2014, PostgreSQL Global Development Group
  *
  * IDENTIFICATION
- *             src/include/utils/rbtree.h
+ *             src/include/lib/rbtree.h
  *
  *-------------------------------------------------------------------------
  */