1
0
mirror of https://github.com/postgres/postgres.git synced 2025-09-02 04:21:28 +03:00
Files
postgres/src/backend/lib
Heikki Linnakangas 02ec4cd179 Use appendStringInfoString/Char et al where appropriate.
Patch by David Rowley. Backpatch to 9.5, as some of the calls were new in
9.5, and keeping the code in sync with master makes future backpatching
easier.
2015-07-02 12:36:31 +03:00
..
2015-01-06 11:43:47 -05:00
2015-05-23 21:35:49 -04:00
2015-05-23 21:35:49 -04:00
2015-01-06 11:43:47 -05:00
2015-01-06 11:43:47 -05:00
2015-01-23 15:06:53 -05:00
2015-01-06 11:43:47 -05:00

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.