Skip to content

Commit

Permalink
Update community license related errors
Browse files Browse the repository at this point in the history
Update the error message printed when attempting to use
a community license feature with apache license installed.

Fixes #5438
  • Loading branch information
konskov committed Mar 27, 2023
1 parent a51d21e commit 22841ab
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
7 changes: 5 additions & 2 deletions src/cross_module_fn.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,11 @@ error_no_default_fn_community(void)
{
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
errmsg("functionality not supported under the current \"%s\" license", ts_guc_license),
errhint("Upgrade your license to 'timescale' to use this free community feature.")));
errmsg("functionality not supported under the current \"%s\" license. Learn more at "
"https://timescale.com/.",
ts_guc_license),
errhint("To get access to all features, and the best time-series experience try out "
"Timescale Cloud.")));
}

static bool
Expand Down
7 changes: 5 additions & 2 deletions src/nodes/chunk_dispatch/chunk_dispatch.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,11 @@ ts_chunk_dispatch_get_chunk_insert_state(ChunkDispatch *dispatch, Point *point,
else
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
errmsg("functionality not supported under the current \"%s\" license",
ts_guc_license)));
errmsg("functionality not supported under the current \"%s\" license. "
"Learn more at https://timescale.com/.",
ts_guc_license),
errhint("To get access to all features, and the best time-series "
"experience try out Timescale Cloud")));
}

MemoryContextSwitchTo(old_context);
Expand Down
8 changes: 4 additions & 4 deletions test/expected/license.out
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ SELECT create_hypertable('metrics', 'time');
(1 row)

ALTER TABLE metrics SET (timescaledb.compress);
ERROR: functionality not supported under the current "apache" license
HINT: Upgrade your license to 'timescale' to use this free community feature.
ERROR: functionality not supported under the current "apache" license. Learn more at https://timescale.com/.
HINT: To get access to all features, and the best time-series experience try out Timescale Cloud.
INSERT INTO metrics
VALUES ('2022-01-01 00:00:00', 1), ('2022-01-01 01:00:00', 2), ('2022-01-01 02:00:00', 3);
CREATE MATERIALIZED VIEW metrics_hourly
Expand All @@ -66,8 +66,8 @@ SELECT time_bucket(INTERVAL '1 hour', time) AS bucket,
FROM metrics
GROUP BY bucket
WITH NO DATA;
ERROR: functionality not supported under the current "apache" license
HINT: Upgrade your license to 'timescale' to use this free community feature.
ERROR: functionality not supported under the current "apache" license. Learn more at https://timescale.com/.
HINT: To get access to all features, and the best time-series experience try out Timescale Cloud.
CREATE MATERIALIZED VIEW metrics_hourly
AS
SELECT time_bucket(INTERVAL '1 hour', time) AS bucket,
Expand Down

0 comments on commit 22841ab

Please sign in to comment.