Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb9d092c

Browse files
committed
Remove now-dead code for !HAVE_INT64_TIMESTAMP.
This is a basically mechanical removal of #ifdef HAVE_INT64_TIMESTAMPtests and the negative-case controlled code.Discussion:https://postgr.es/m/26788.1487455319@sss.pgh.pa.us
1 parentd28aafb commitb9d092c

File tree

26 files changed

+28
-1298
lines changed

26 files changed

+28
-1298
lines changed

‎contrib/btree_gist/btree_time.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -179,11 +179,7 @@ gbt_timetz_compress(PG_FUNCTION_ARGS)
179179
retval=palloc(sizeof(GISTENTRY));
180180

181181
/* We are using the time + zone only to compress */
182-
#ifdefHAVE_INT64_TIMESTAMP
183182
tmp=tz->time+ (tz->zone*INT64CONST(1000000));
184-
#else
185-
tmp= (tz->time+tz->zone);
186-
#endif
187183
r->lower=r->upper=tmp;
188184
gistentryinit(*retval,PointerGetDatum(r),
189185
entry->rel,entry->page,
@@ -259,11 +255,7 @@ gbt_timetz_consistent(PG_FUNCTION_ARGS)
259255
/* All cases served by this function are inexact */
260256
*recheck= true;
261257

262-
#ifdefHAVE_INT64_TIMESTAMP
263258
qqq=query->time+ (query->zone*INT64CONST(1000000));
264-
#else
265-
qqq= (query->time+query->zone);
266-
#endif
267259

268260
key.lower= (GBT_NUMKEY*)&kkk->lower;
269261
key.upper= (GBT_NUMKEY*)&kkk->upper;

‎contrib/btree_gist/btree_ts.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -153,11 +153,7 @@ ts_dist(PG_FUNCTION_ARGS)
153153

154154
p->day=INT_MAX;
155155
p->month=INT_MAX;
156-
#ifdefHAVE_INT64_TIMESTAMP
157156
p->time=PG_INT64_MAX;
158-
#else
159-
p->time=DBL_MAX;
160-
#endif
161157
PG_RETURN_INTERVAL_P(p);
162158
}
163159
else
@@ -181,11 +177,7 @@ tstz_dist(PG_FUNCTION_ARGS)
181177

182178
p->day=INT_MAX;
183179
p->month=INT_MAX;
184-
#ifdefHAVE_INT64_TIMESTAMP
185180
p->time=PG_INT64_MAX;
186-
#else
187-
p->time=DBL_MAX;
188-
#endif
189181
PG_RETURN_INTERVAL_P(p);
190182
}
191183

‎contrib/btree_gist/btree_utils_num.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -82,17 +82,10 @@ typedef struct
8282
* (as a double). Here because we need it for time/timetz as well as
8383
* interval. See interval_cmp_internal for comparison.
8484
*/
85-
#ifdefHAVE_INT64_TIMESTAMP
8685
#defineINTERVAL_TO_SEC(ivp) \
8786
(((double) (ivp)->time) / ((double) USECS_PER_SEC) + \
8887
(ivp)->day * (24.0 * SECS_PER_HOUR) + \
8988
(ivp)->month * (30.0 * SECS_PER_DAY))
90-
#else
91-
#defineINTERVAL_TO_SEC(ivp) \
92-
((ivp)->time + \
93-
(ivp)->day * (24.0 * SECS_PER_HOUR) + \
94-
(ivp)->month * (30.0 * SECS_PER_DAY))
95-
#endif
9689

9790
#defineGET_FLOAT_DISTANCE(t,arg1,arg2)Abs( ((float8) *((const t *) (arg1))) - ((float8) *((const t *) (arg2))) )
9891

‎src/backend/commands/variable.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -308,11 +308,7 @@ check_timezone(char **newval, void **extra, GucSource source)
308308
}
309309

310310
/* Here we change from SQL to Unix sign convention */
311-
#ifdefHAVE_INT64_TIMESTAMP
312311
gmtoffset=-(interval->time /USECS_PER_SEC);
313-
#else
314-
gmtoffset=-interval->time;
315-
#endif
316312
new_tz=pg_tzset_offset(gmtoffset);
317313

318314
pfree(interval);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp