Closed tingyi-suger closed 2 months ago
I'm sorry, I don't see any unexpected behavior here. If you empty your search path, create_hypertable
function needs to be referred via the schema it resides in _timescaledb_functions
.
In that case, this should work:
select _timescaledb_functions.create_hypertable('metering.usage_record_group', by_range('creation_time'));
Hope this helps!
What type of bug is this?
Incorrect result, Unexpected error
What subsystems and features are affected?
Command processing, Query executor
What happened?
timescale/timescaledb-ha:pg16
CREATE TABLE usage_record_group ( id character varying(36) NOT NULL, creation_time timestamp with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL );
select create_hypertable('metering.usage_record_group', by_range('creation_time'));
ERROR: function by_range(unknown) does not exist LINE 1: ... create_hypertable('usage_record_group', by_range('... ^ HINT: No function matches the given name and argument types. You might need to add explicit type casts.
CREATE TABLE usage_record_group ( id character varying(36) NOT NULL, creation_time timestamp with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL );
select create_hypertable('metering.usage_record_group', by_range('creation_time'));