Make older_than / newer_than error message user friendly

This commit is contained in:
dianasaur323 2018-12-25 09:56:02 -05:00 committed by Diana Hsieh
parent 81d85ff60d
commit 34c8096831
2 changed files with 2 additions and 2 deletions

View File

@ -1118,7 +1118,7 @@ chunks_typecheck_and_find_all_in_range_limit(Hyperspace *hs,
ereport(ERROR,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
errmsg("When both older_than and newer_than are specified, "
"older_than must come after newer_than")
"older_than must come after newer_than so that a valid overlapping range is specified")
));
oldcontext = MemoryContextSwitchTo(multi_call_memory_ctx);

View File

@ -222,7 +222,7 @@ SELECT show_chunks('drop_chunk_test3', now());
ERROR: time constraint arguments of "show_chunks" should have same type as time column of the hypertable
-- should error because of wrong relative order of time constraints
SELECT show_chunks('drop_chunk_test1', older_than=>3, newer_than=>4);
ERROR: When both older_than and newer_than are specified, older_than must come after newer_than
ERROR: When both older_than and newer_than are specified, older_than must come after newer_than so that a valid overlapping range is specified
\set ON_ERROR_STOP 1
--should always work regardless of time column types of hypertables
SELECT show_chunks();