postgresql/src/backend/lib
Bruce Momjian a6fd7b7a5f Post-PG 10 beta1 pgindent run
perltidy run not included.
2017-05-17 16:31:56 -04:00
..
Makefile Support hashed aggregation with grouping sets. 2017-03-27 04:20:54 +01:00
README Fix typos, update README. 2015-01-23 15:06:53 -05:00
binaryheap.c Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
bipartite_match.c Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
hyperloglog.c Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
ilist.c Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
knapsack.c Support hashed aggregation with grouping sets. 2017-03-27 04:20:54 +01:00
pairingheap.c Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
rbtree.c Post-PG 10 beta1 pgindent run 2017-05-17 16:31:56 -04:00
stringinfo.c Revert "Permit dump/reload of not-too-large >1GB tuples" 2017-05-10 18:41:27 -03:00

README

This directory contains a general purpose data structures, for use anywhere
in the backend:

binaryheap.c - a binary heap

hyperloglog.c - a streaming cardinality estimator

pairingheap.c - a pairing heap

rbtree.c - a red-black tree

ilist.c - single and double-linked lists.

stringinfo.c - an extensible string type


Aside from the inherent characteristics of the data structures, there are a
few practical differences between the binary heap and the pairing heap. The
binary heap is fully allocated at creation, and cannot be expanded beyond the
allocated size. The pairing heap on the other hand has no inherent maximum
size, but the caller needs to allocate each element being stored in the heap,
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.