Before doing so, the function should check the sign
of offset: if it is less than zero, raise
- error ERRCODE_INVALID_PRECEDING_FOLLOWING_SIZE (22013)
+ error ERRCODE_INVALID_PRECEDING_OR_FOLLOWING_SIZE (22013)
with error text like invalid preceding or following size in window
function. (This is required by the SQL standard, although
nonstandard operator families might perhaps choose to ignore this
if (offset < 0)
ereport(ERROR,
- (errcode(ERRCODE_INVALID_PRECEDING_FOLLOWING_SIZE),
+ (errcode(ERRCODE_INVALID_PRECEDING_OR_FOLLOWING_SIZE),
errmsg("frame starting offset must not be negative")));
}
}
if (offset < 0)
ereport(ERROR,
- (errcode(ERRCODE_INVALID_PRECEDING_FOLLOWING_SIZE),
+ (errcode(ERRCODE_INVALID_PRECEDING_OR_FOLLOWING_SIZE),
errmsg("frame ending offset must not be negative")));
}
}
*/
if (offset->time < 0)
ereport(ERROR,
- (errcode(ERRCODE_INVALID_PRECEDING_FOLLOWING_SIZE),
+ (errcode(ERRCODE_INVALID_PRECEDING_OR_FOLLOWING_SIZE),
errmsg("invalid preceding or following size in window function")));
/*
*/
if (offset->time < 0)
ereport(ERROR,
- (errcode(ERRCODE_INVALID_PRECEDING_FOLLOWING_SIZE),
+ (errcode(ERRCODE_INVALID_PRECEDING_OR_FOLLOWING_SIZE),
errmsg("invalid preceding or following size in window function")));
/*
*/
if (isnan(offset) || offset < 0)
ereport(ERROR,
- (errcode(ERRCODE_INVALID_PRECEDING_FOLLOWING_SIZE),
+ (errcode(ERRCODE_INVALID_PRECEDING_OR_FOLLOWING_SIZE),
errmsg("invalid preceding or following size in window function")));
/*
*/
if (isnan(offset) || offset < 0)
ereport(ERROR,
- (errcode(ERRCODE_INVALID_PRECEDING_FOLLOWING_SIZE),
+ (errcode(ERRCODE_INVALID_PRECEDING_OR_FOLLOWING_SIZE),
errmsg("invalid preceding or following size in window function")));
/*
if (offset < 0)
ereport(ERROR,
- (errcode(ERRCODE_INVALID_PRECEDING_FOLLOWING_SIZE),
+ (errcode(ERRCODE_INVALID_PRECEDING_OR_FOLLOWING_SIZE),
errmsg("invalid preceding or following size in window function")));
if (sub)
if (offset < 0)
ereport(ERROR,
- (errcode(ERRCODE_INVALID_PRECEDING_FOLLOWING_SIZE),
+ (errcode(ERRCODE_INVALID_PRECEDING_OR_FOLLOWING_SIZE),
errmsg("invalid preceding or following size in window function")));
if (sub)
if (offset < 0)
ereport(ERROR,
- (errcode(ERRCODE_INVALID_PRECEDING_FOLLOWING_SIZE),
+ (errcode(ERRCODE_INVALID_PRECEDING_OR_FOLLOWING_SIZE),
errmsg("invalid preceding or following size in window function")));
if (sub)
if (offset < 0)
ereport(ERROR,
- (errcode(ERRCODE_INVALID_PRECEDING_FOLLOWING_SIZE),
+ (errcode(ERRCODE_INVALID_PRECEDING_OR_FOLLOWING_SIZE),
errmsg("invalid preceding or following size in window function")));
if (sub)
*/
if (NUMERIC_IS_NAN(offset) || NUMERIC_SIGN(offset) == NUMERIC_NEG)
ereport(ERROR,
- (errcode(ERRCODE_INVALID_PRECEDING_FOLLOWING_SIZE),
+ (errcode(ERRCODE_INVALID_PRECEDING_OR_FOLLOWING_SIZE),
errmsg("invalid preceding or following size in window function")));
/*
if (int128_compare(interval_cmp_value(offset), int64_to_int128(0)) < 0)
ereport(ERROR,
- (errcode(ERRCODE_INVALID_PRECEDING_FOLLOWING_SIZE),
+ (errcode(ERRCODE_INVALID_PRECEDING_OR_FOLLOWING_SIZE),
errmsg("invalid preceding or following size in window function")));
/* We don't currently bother to avoid overflow hazards here */
if (int128_compare(interval_cmp_value(offset), int64_to_int128(0)) < 0)
ereport(ERROR,
- (errcode(ERRCODE_INVALID_PRECEDING_FOLLOWING_SIZE),
+ (errcode(ERRCODE_INVALID_PRECEDING_OR_FOLLOWING_SIZE),
errmsg("invalid preceding or following size in window function")));
/* We don't currently bother to avoid overflow hazards here */
if (int128_compare(interval_cmp_value(offset), int64_to_int128(0)) < 0)
ereport(ERROR,
- (errcode(ERRCODE_INVALID_PRECEDING_FOLLOWING_SIZE),
+ (errcode(ERRCODE_INVALID_PRECEDING_OR_FOLLOWING_SIZE),
errmsg("invalid preceding or following size in window function")));
/* We don't currently bother to avoid overflow hazards here */
22P06 E ERRCODE_NONSTANDARD_USE_OF_ESCAPE_CHARACTER nonstandard_use_of_escape_character
22010 E ERRCODE_INVALID_INDICATOR_PARAMETER_VALUE invalid_indicator_parameter_value
22023 E ERRCODE_INVALID_PARAMETER_VALUE invalid_parameter_value
-22013 E ERRCODE_INVALID_PRECEDING_FOLLOWING_SIZE invalid_preceding_following_size
+22013 E ERRCODE_INVALID_PRECEDING_OR_FOLLOWING_SIZE invalid_preceding_or_following_size
2201B E ERRCODE_INVALID_REGULAR_EXPRESSION invalid_regular_expression
2201W E ERRCODE_INVALID_ROW_COUNT_IN_LIMIT_CLAUSE invalid_row_count_in_limit_clause
2201X E ERRCODE_INVALID_ROW_COUNT_IN_RESULT_OFFSET_CLAUSE invalid_row_count_in_result_offset_clause