|
8 | 8 | * |
9 | 9 | * |
10 | 10 | * IDENTIFICATION |
11 | | - * $PostgreSQL: pgsql/src/backend/utils/adt/timestamp.c,v 1.192 2008/09/11 15:27:30 tgl Exp $ |
| 11 | + * $PostgreSQL: pgsql/src/backend/utils/adt/timestamp.c,v 1.193 2008/10/14 15:44:29 tgl Exp $ |
12 | 12 | * |
13 | 13 | *------------------------------------------------------------------------- |
14 | 14 | */ |
@@ -64,7 +64,7 @@ typedef struct |
64 | 64 |
|
65 | 65 |
|
66 | 66 | static TimeOffset time2t(const int hour, const int min, const int sec, const fsec_t fsec); |
67 | | -static int EncodeSpecialTimestamp(Timestamp dt, char *str); |
| 67 | +static void EncodeSpecialTimestamp(Timestamp dt, char *str); |
68 | 68 | static Timestamp dt2local(Timestamp dt, int timezone); |
69 | 69 | static void AdjustTimestampForTypmod(Timestamp *time, int32 typmod); |
70 | 70 | static void AdjustIntervalForTypmod(Interval *interval, int32 typmod); |
@@ -1150,18 +1150,16 @@ AdjustIntervalForTypmod(Interval *interval, int32 typmod) |
1150 | 1150 | /* EncodeSpecialTimestamp() |
1151 | 1151 | * Convert reserved timestamp data type to string. |
1152 | 1152 | */ |
1153 | | -static int |
| 1153 | +static void |
1154 | 1154 | EncodeSpecialTimestamp(Timestamp dt, char *str) |
1155 | 1155 | { |
1156 | 1156 | if (TIMESTAMP_IS_NOBEGIN(dt)) |
1157 | 1157 | strcpy(str, EARLY); |
1158 | 1158 | else if (TIMESTAMP_IS_NOEND(dt)) |
1159 | 1159 | strcpy(str, LATE); |
1160 | | - else |
1161 | | - return FALSE; |
1162 | | - |
1163 | | - return TRUE; |
1164 | | -} /* EncodeSpecialTimestamp() */ |
| 1160 | + else /* shouldn't happen */ |
| 1161 | + elog(ERROR, "invalid argument for EncodeSpecialTimestamp"); |
| 1162 | +} |
1165 | 1163 |
|
1166 | 1164 | Datum |
1167 | 1165 | now(PG_FUNCTION_ARGS) |
|
0 commit comments