Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
db306521
Commit
db306521
authored
Apr 17, 2005
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Initial implementation of lossy-tuple-bitmap data structures.
Not connected to anything useful yet ...
parent
18b98505
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
840 additions
and
6 deletions
+840
-6
src/backend/nodes/Makefile
src/backend/nodes/Makefile
+2
-2
src/backend/nodes/tidbitmap.c
src/backend/nodes/tidbitmap.c
+774
-0
src/include/nodes/nodes.h
src/include/nodes/nodes.h
+9
-4
src/include/nodes/tidbitmap.h
src/include/nodes/tidbitmap.h
+55
-0
No files found.
src/backend/nodes/Makefile
View file @
db306521
...
...
@@ -4,7 +4,7 @@
# Makefile for backend/nodes
#
# IDENTIFICATION
# $PostgreSQL: pgsql/src/backend/nodes/Makefile,v 1.1
7 2004/08/02 01:30:4
2 tgl Exp $
# $PostgreSQL: pgsql/src/backend/nodes/Makefile,v 1.1
8 2005/04/17 22:24:0
2 tgl Exp $
#
#-------------------------------------------------------------------------
...
...
@@ -12,7 +12,7 @@ subdir = src/backend/nodes
top_builddir
=
../../..
include
$(top_builddir)/src/Makefile.global
OBJS
=
nodeFuncs.o nodes.o list.o bitmapset.o
\
OBJS
=
nodeFuncs.o nodes.o list.o bitmapset.o
tidbitmap.o
\
copyfuncs.o equalfuncs.o makefuncs.o
\
outfuncs.o readfuncs.o print.o read.o params.o value.o
...
...
src/backend/nodes/tidbitmap.c
0 → 100644
View file @
db306521
This diff is collapsed.
Click to expand it.
src/include/nodes/nodes.h
View file @
db306521
...
...
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $PostgreSQL: pgsql/src/include/nodes/nodes.h,v 1.16
5 2005/04/06 16:34:07
tgl Exp $
* $PostgreSQL: pgsql/src/include/nodes/nodes.h,v 1.16
6 2005/04/17 22:24:02
tgl Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -304,11 +304,16 @@ typedef enum NodeTag
T_FunctionParameter
,
/*
* TAGS FOR FUNCTION-CALL CONTEXT AND RESULTINFO NODES (see fmgr.h)
* TAGS FOR RANDOM OTHER STUFF
*
* These are objects that aren't part of parse/plan/execute node tree
* structures, but we give them NodeTags anyway for identification
* purposes (usually because they are involved in APIs where we want
* to pass multiple object types through the same pointer).
*/
T_TriggerData
=
900
,
/* in commands/trigger.h */
T_ReturnSetInfo
/* in nodes/execnodes.h */
T_ReturnSetInfo
,
/* in nodes/execnodes.h */
T_TIDBitmap
/* in nodes/tidbitmap.h */
}
NodeTag
;
/*
...
...
src/include/nodes/tidbitmap.h
0 → 100644
View file @
db306521
/*-------------------------------------------------------------------------
*
* tidbitmap.h
* PostgreSQL tuple-id (TID) bitmap package
*
* This module provides bitmap data structures that are spiritually
* similar to Bitmapsets, but are specially adapted to store sets of
* tuple identifiers (TIDs), or ItemPointers. In particular, the division
* of an ItemPointer into BlockNumber and OffsetNumber is catered for.
* Also, since we wish to be able to store very large tuple sets in
* memory with this data structure, we support "lossy" storage, in which
* we no longer remember individual tuple offsets on a page but only the
* fact that a particular page needs to be visited.
*
*
* Copyright (c) 2003-2005, PostgreSQL Global Development Group
*
* $PostgreSQL: pgsql/src/include/nodes/tidbitmap.h,v 1.1 2005/04/17 22:24:02 tgl Exp $
*
*-------------------------------------------------------------------------
*/
#ifndef TIDBITMAP_H
#define TIDBITMAP_H
#include "storage/itemptr.h"
/*
* Actual bitmap representation is private to tidbitmap.c. Callers can
* do IsA(x, TIDBitmap) on it, but nothing else.
*/
typedef
struct
TIDBitmap
TIDBitmap
;
/* Result structure for tbm_iterate */
typedef
struct
{
BlockNumber
blockno
;
/* page number containing tuples */
int
ntuples
;
/* -1 indicates lossy result */
OffsetNumber
offsets
[
1
];
/* VARIABLE LENGTH ARRAY */
}
TBMIterateResult
;
/* VARIABLE LENGTH STRUCT */
/* function prototypes in nodes/tidbitmap.c */
extern
TIDBitmap
*
tbm_create
(
long
maxbytes
);
extern
void
tbm_free
(
TIDBitmap
*
tbm
);
extern
void
tbm_add_tuples
(
TIDBitmap
*
tbm
,
const
ItemPointer
tids
,
int
ntids
);
extern
void
tbm_union
(
TIDBitmap
*
a
,
const
TIDBitmap
*
b
);
extern
void
tbm_intersect
(
TIDBitmap
*
a
,
const
TIDBitmap
*
b
);
extern
void
tbm_begin_iterate
(
TIDBitmap
*
tbm
);
extern
TBMIterateResult
*
tbm_iterate
(
TIDBitmap
*
tbm
);
#endif
/* TIDBITMAP_H */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment