Skip to content

Commit 955557d

Browse files
committed
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.
1 parent 7f0dcca commit 955557d

File tree

6 files changed

+8
-9
lines changed

6 files changed

+8
-9
lines changed

src/backend/lib/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ subdir = src/backend/lib
1212
top_builddir = ../../..
1313
include $(top_builddir)/src/Makefile.global
1414

15-
OBJS = ilist.o binaryheap.o pairingheap.o stringinfo.o
15+
OBJS = ilist.o binaryheap.o pairingheap.o rbtree.o stringinfo.o
1616

1717
include $(top_srcdir)/src/backend/common.mk

src/backend/lib/README

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ binaryheap.c - a binary heap
55

66
pairingheap.c - a pairing heap
77

8+
rbtree.c - a red-black tree
9+
810
ilist.c - single and double-linked lists.
911

1012
stringinfo.c - an extensible string type
@@ -19,6 +21,3 @@ while the binary heap works with plain Datums or pointers.
1921

2022
The linked-lists in ilist.c can be embedded directly into other structs, as
2123
opposed to the List interface in nodes/pg_list.h.
22-
23-
In addition to these, there is an implementation of a Red-Black tree in
24-
src/backend/utils/adt/rbtree.c.

src/backend/utils/misc/rbtree.c renamed to src/backend/lib/rbtree.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@
2020
* Copyright (c) 2009-2014, PostgreSQL Global Development Group
2121
*
2222
* IDENTIFICATION
23-
* src/backend/utils/misc/rbtree.c
23+
* src/backend/lib/rbtree.c
2424
*
2525
*-------------------------------------------------------------------------
2626
*/
2727
#include "postgres.h"
2828

29-
#include "utils/rbtree.h"
29+
#include "lib/rbtree.h"
3030

3131

3232
/*

src/backend/utils/misc/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ include $(top_builddir)/src/Makefile.global
1414

1515
override CPPFLAGS := -I. -I$(srcdir) $(CPPFLAGS)
1616

17-
OBJS = guc.o help_config.o pg_rusage.o ps_status.o rbtree.o \
17+
OBJS = guc.o help_config.o pg_rusage.o ps_status.o \
1818
superuser.o timeout.o tzparser.o
1919

2020
# This location might depend on the installation directories. Therefore

src/include/access/gin_private.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#include "access/itup.h"
1616
#include "fmgr.h"
1717
#include "storage/bufmgr.h"
18-
#include "utils/rbtree.h"
18+
#include "lib/rbtree.h"
1919

2020

2121
/*

src/include/utils/rbtree.h renamed to src/include/lib/rbtree.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Copyright (c) 2009-2014, PostgreSQL Global Development Group
77
*
88
* IDENTIFICATION
9-
* src/include/utils/rbtree.h
9+
* src/include/lib/rbtree.h
1010
*
1111
*-------------------------------------------------------------------------
1212
*/

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy