Skip to content

Commit 9eeb300

Browse files
jamessewellsvenklemm
authored andcommitted
Fix CREATE WITH (timescaledb.hypertable) error
The error message when you omitted tsdb.partition_column used to mention time_column, which makes it seem like the name of the option.
1 parent b5e96ea commit 9eeb300

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

src/process_utility.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5028,7 +5028,7 @@ process_create_stmt(ProcessUtilityArgs *args)
50285028
if (!create_table_info.with_clauses[CreateTableFlagTimeColumn].parsed)
50295029
ereport(ERROR,
50305030
(errcode(ERRCODE_UNDEFINED_COLUMN),
5031-
errmsg("hypertable option requires time_column"),
5031+
errmsg("hypertable option requires partition_column"),
50325032
errhint(
50335033
"Use \"timescaledb.partition_column\" to specify the column to use as "
50345034
"partitioning column.")));

test/expected/create_table_with.out

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ DROP TABLE t1;
1212
\set ON_ERROR_STOP 0
1313
\set VERBOSITY default
1414
CREATE TABLE t2(time timestamptz, device text, value float) WITH (tsdb.hypertable);
15-
ERROR: hypertable option requires time_column
15+
ERROR: hypertable option requires partition_column
1616
HINT: Use "timescaledb.partition_column" to specify the column to use as partitioning column.
1717
CREATE TABLE t2(time timestamptz, device text, value float) WITH (timescaledb.hypertable);
18-
ERROR: hypertable option requires time_column
18+
ERROR: hypertable option requires partition_column
1919
HINT: Use "timescaledb.partition_column" to specify the column to use as partitioning column.
2020
CREATE TABLE t2(time timestamptz, device text, value float) WITH (tsdb.hypertable,tsdb.partition_column=NULL);
2121
ERROR: column "null" does not exist

tsl/test/expected/create_table_with.out

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ DROP TABLE t1;
1111
-- test error cases
1212
\set ON_ERROR_STOP 0
1313
CREATE TABLE t2(time timestamptz, device text, value float) WITH (tsdb.hypertable);
14-
ERROR: hypertable option requires time_column
14+
ERROR: hypertable option requires partition_column
1515
CREATE TABLE t2(time timestamptz, device text, value float) WITH (timescaledb.hypertable);
16-
ERROR: hypertable option requires time_column
16+
ERROR: hypertable option requires partition_column
1717
CREATE TABLE t2(time timestamptz, device text, value float) WITH (tsdb.hypertable,tsdb.partition_column=NULL);
1818
ERROR: column "null" does not exist
1919
CREATE TABLE t2(time timestamptz, device text, value float) WITH (tsdb.hypertable,tsdb.partition_column='');

0 commit comments

Comments
 (0)