Skip to content

Commit a7801b6

Browse files
committed
Move Timestamp/Interval typedefs and basic macros into datatype/timestamp.h.
As per my recent proposal, this refactors things so that these typedefs and macros are available in a header that can be included in frontend-ish code. I also changed various headers that were undesirably including utils/timestamp.h to include datatype/timestamp.h instead. Unsurprisingly, this showed that half the system was getting utils/timestamp.h by way of xlog.h. No actual code changes here, just header refactoring.
1 parent d63de33 commit a7801b6

File tree

43 files changed

+213
-150
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+213
-150
lines changed

contrib/btree_gist/btree_utils_num.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include "btree_utils_num.h"
88
#include "utils/cash.h"
99
#include "utils/date.h"
10+
#include "utils/timestamp.h"
1011

1112

1213
GISTENTRY *

contrib/spi/moddatetime.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ OH, me, I'm Terry Mackintosh <terry@terrym.com>
1919
#include "executor/spi.h"
2020
#include "commands/trigger.h"
2121
#include "utils/rel.h"
22+
#include "utils/timestamp.h"
2223

2324
PG_MODULE_MAGIC;
2425

doc/src/sgml/xfunc.sgml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1904,7 +1904,7 @@ memcpy(destination->data, buffer, 40);
19041904
<row>
19051905
<entry><type>interval</type></entry>
19061906
<entry><type>Interval*</type></entry>
1907-
<entry><filename>utils/timestamp.h</filename></entry>
1907+
<entry><filename>datatype/timestamp.h</filename></entry>
19081908
</row>
19091909
<row>
19101910
<entry><type>lseg</type></entry>
@@ -1969,7 +1969,7 @@ memcpy(destination->data, buffer, 40);
19691969
<row>
19701970
<entry><type>timestamp</type></entry>
19711971
<entry><type>Timestamp*</type></entry>
1972-
<entry><filename>utils/timestamp.h</filename></entry>
1972+
<entry><filename>datatype/timestamp.h</filename></entry>
19731973
</row>
19741974
<row>
19751975
<entry><type>tinterval</type></entry>

src/backend/access/transam/twophase.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@
6464
#include "storage/smgr.h"
6565
#include "utils/builtins.h"
6666
#include "utils/memutils.h"
67+
#include "utils/timestamp.h"
6768

6869

6970
/*

src/backend/access/transam/xact.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
#include "utils/memutils.h"
5050
#include "utils/relmapper.h"
5151
#include "utils/snapmgr.h"
52+
#include "utils/timestamp.h"
5253
#include "pg_trace.h"
5354

5455

src/backend/access/transam/xlog.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
#include "utils/guc.h"
5959
#include "utils/ps_status.h"
6060
#include "utils/relmapper.h"
61+
#include "utils/timestamp.h"
6162
#include "pg_trace.h"
6263

6364

src/backend/commands/analyze.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
#include "utils/pg_rusage.h"
4949
#include "utils/syscache.h"
5050
#include "utils/tuplesort.h"
51+
#include "utils/timestamp.h"
5152
#include "utils/tqual.h"
5253

5354

src/backend/commands/async.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@
132132
#include "utils/builtins.h"
133133
#include "utils/memutils.h"
134134
#include "utils/ps_status.h"
135+
#include "utils/timestamp.h"
135136

136137

137138
/*

src/backend/commands/prepare.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
#include "tcop/utility.h"
3232
#include "utils/builtins.h"
3333
#include "utils/snapmgr.h"
34+
#include "utils/timestamp.h"
3435

3536

3637
/*

src/backend/commands/user.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
#include "utils/builtins.h"
3434
#include "utils/fmgroids.h"
3535
#include "utils/syscache.h"
36+
#include "utils/timestamp.h"
3637
#include "utils/tqual.h"
3738

3839
/* Potentially set by contrib/pg_upgrade_support functions */

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy