summaryrefslogtreecommitdiff
path: root/src/include/utils/tqual.h
blob: a32ccb2ab1398565ba87a539529f9cc32255fc86 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/*-------------------------------------------------------------------------
 *
 * tqual.h--
 *	  POSTGRES time qualification definitions.
 *
 *
 * Copyright (c) 1994, Regents of the University of California
 *
 * $Id: tqual.h,v 1.7 1997/09/07 05:03:03 momjian Exp $
 *
 * NOTE
 *	  It may be desirable to allow time qualifications to indicate
 *	  relative times.
 *
 *-------------------------------------------------------------------------
 */
#ifndef TQUAL_H
#define TQUAL_H

#include <access/htup.h>

typedef struct TimeQualSpace
{
	char			data[12];
}				TimeQualSpace;

typedef Pointer TimeQual;

/* Tuples valid as of StartTransactionCommand */
#define NowTimeQual		((TimeQual) NULL)

/* As above, plus updates in this command */
extern TimeQual SelfTimeQual;

extern void		setheapoverride(bool on);
extern bool		heapisoverride(void);

extern TimeQual TimeFormSnapshotTimeQual(AbsoluteTime time);
extern TimeQual
TimeFormRangedTimeQual(AbsoluteTime startTime,
					   AbsoluteTime endTime);
extern bool		HeapTupleSatisfiesTimeQual(HeapTuple tuple, TimeQual qual);


#endif							/* TQUAL_H */