diff options
| author | Robert Haas | 2016-08-05 15:57:00 +0000 |
|---|---|---|
| committer | Robert Haas | 2016-08-05 15:58:03 +0000 |
| commit | 81c766b3fd41c78c634d78ebae8d316808dfc630 (patch) | |
| tree | 30b95d6aa9a8af814183201a55b18e4330033ce3 /src/include | |
| parent | e7caacf733f3ee77a555aa715ab6fbf4434e6b52 (diff) | |
Change InitToastSnapshot to a macro.
tqual.h is included in some front-end compiles, and a static inline
breaks on buildfarm member castoroides. Since the macro is never
referenced, it should dodge that problem, although this doesn't
seem like the cleanest way of hiding things from front-end compiles.
Report and review by Tom Lane; patch by me.
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/utils/tqual.h | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/include/utils/tqual.h b/src/include/utils/tqual.h index 8041e7b67fe..fc7328c1e2e 100644 --- a/src/include/utils/tqual.h +++ b/src/include/utils/tqual.h @@ -104,12 +104,9 @@ extern bool ResolveCminCmaxDuringDecoding(struct HTAB *tuplecid_data, * Similarly, some initialization is required for SnapshotToast. We need * to set lsn and whenTaken correctly to support snapshot_too_old. */ -static inline void -InitToastSnapshot(Snapshot snapshot, XLogRecPtr lsn, int64 whenTaken) -{ - snapshot->satisfies = HeapTupleSatisfiesToast; - snapshot->lsn = lsn; - snapshot->whenTaken = whenTaken; -} +#define InitToastSnapshot(snapshotdata, l, w) \ + ((snapshotdata).satisfies = HeapTupleSatisfiesDirty, \ + (snapshotdata).lsn = (l), \ + (snapshotdata).whenTaken = (w)) #endif /* TQUAL_H */ |
