diff --git a/sql/chunk_constraint.sql b/sql/chunk_constraint.sql index f2abc395b..18bfe0acb 100644 --- a/sql/chunk_constraint.sql +++ b/sql/chunk_constraint.sql @@ -27,7 +27,7 @@ BEGIN conrelid = format('%I.%I', hypertable_row.schema_name, hypertable_row.table_name)::regclass::oid; def := pg_get_constraintdef(constraint_oid); ELSE - RAISE 'Unknown constraint type'; + RAISE 'unknown constraint type'; END IF; IF def IS NOT NULL THEN diff --git a/sql/ddl_api.sql b/sql/ddl_api.sql index dc9805618..3f8beef2c 100644 --- a/sql/ddl_api.sql +++ b/sql/ddl_api.sql @@ -60,7 +60,7 @@ DECLARE older_than_internal BIGINT; BEGIN IF older_than IS NULL THEN - RAISE 'The timestamp provided to drop_chunks cannot be null'; + RAISE 'the timestamp provided to drop_chunks cannot be NULL'; END IF; PERFORM _timescaledb_internal.drop_chunks_type_check(pg_typeof(older_than), table_name, schema_name); @@ -93,9 +93,9 @@ BEGIN FROM hypertable_ids INNER JOIN LATERAL _timescaledb_internal.dimension_get_time(hypertable_ids.id) time_dim ON (true); EXCEPTION WHEN NO_DATA_FOUND THEN - RAISE EXCEPTION 'No hypertables found'; + RAISE EXCEPTION 'no hypertables found'; WHEN TOO_MANY_ROWS THEN - RAISE EXCEPTION 'Cannot use drop_chunks on multiple tables with different time types'; + RAISE EXCEPTION 'cannot use drop_chunks on multiple tables with different time types'; END; @@ -106,7 +106,7 @@ BEGIN ELSIF time_type = 'TIMESTAMPTZ'::regtype THEN PERFORM @extschema@.drop_chunks(now() - older_than, table_name, schema_name, cascade); ELSE - RAISE 'Can only use drop_chunks with an INTERVAL for TIMESTAMP, TIMESTAMPTZ, and DATE types'; + RAISE 'can only use drop_chunks with an INTERVAL for TIMESTAMP, TIMESTAMPTZ, and DATE types'; END IF; END $BODY$; diff --git a/sql/ddl_internal.sql b/sql/ddl_internal.sql index d774a47c3..887f93cb1 100644 --- a/sql/ddl_internal.sql +++ b/sql/ddl_internal.sql @@ -27,7 +27,7 @@ DECLARE exist_count INT = 0; BEGIN IF older_than_time IS NULL AND table_name IS NULL AND schema_name IS NULL THEN - RAISE 'Cannot have all 3 arguments to drop_chunks_older_than be NULL'; + RAISE 'cannot have all 3 arguments to drop_chunks_older_than be NULL'; END IF; IF cascade THEN @@ -42,7 +42,7 @@ BEGIN INTO STRICT exist_count; IF exist_count = 0 THEN - RAISE 'hypertable % does not exist', drop_chunks_impl.table_name + RAISE 'hypertable "%" does not exist', drop_chunks_impl.table_name USING ERRCODE = 'IO001'; END IF; END IF; @@ -96,9 +96,9 @@ BEGIN FROM hypertable_ids INNER JOIN LATERAL _timescaledb_internal.dimension_get_time(hypertable_ids.id) time_dim ON (true); EXCEPTION WHEN NO_DATA_FOUND THEN - RAISE EXCEPTION 'No hypertables found'; + RAISE EXCEPTION 'no hypertables found'; WHEN TOO_MANY_ROWS THEN - RAISE EXCEPTION 'Cannot use drop_chunks on multiple tables with different time types'; + RAISE EXCEPTION 'cannot use drop_chunks on multiple tables with different time types'; END; IF given_type IN ('int'::regtype, 'smallint'::regtype, 'bigint'::regtype ) THEN @@ -107,7 +107,7 @@ BEGIN END IF; END IF; IF actual_type != given_type THEN - RAISE EXCEPTION 'Cannot call drop_chunks with a % on hypertables with a time type of: %', given_type, actual_type; + RAISE EXCEPTION 'cannot call drop_chunks with a % on hypertables with a time type of: %', given_type, actual_type; END IF; END $BODY$; diff --git a/sql/util_internal_table_ddl.sql b/sql/util_internal_table_ddl.sql index 2b0dbc067..18ef30996 100644 --- a/sql/util_internal_table_ddl.sql +++ b/sql/util_internal_table_ddl.sql @@ -61,7 +61,7 @@ BEGIN --TODO: only works with time for now IF _timescaledb_internal.time_literal_sql(dimension_slice_row.range_start, dimension_row.column_type) = _timescaledb_internal.time_literal_sql(dimension_slice_row.range_end, dimension_row.column_type) THEN - RAISE 'Time based constraints have the same start and end values for column "%": %', + RAISE 'time-based constraints have the same start and end values for column "%": %', dimension_row.column_name, _timescaledb_internal.time_literal_sql(dimension_slice_row.range_end, dimension_row.column_type); END IF; @@ -119,7 +119,7 @@ BEGIN INTO h_id, schema_name; IF h_id IS NULL THEN - RAISE EXCEPTION 'hypertable % not found', table_name + RAISE EXCEPTION 'hypertable "%" not found', table_name USING ERRCODE = 'IO101'; END IF; diff --git a/src/catalog.c b/src/catalog.c index e15a31071..05eda9e5c 100644 --- a/src/catalog.c +++ b/src/catalog.c @@ -162,7 +162,7 @@ catalog_get(void) int i; if (!OidIsValid(MyDatabaseId)) - elog(ERROR, "Invalid database ID"); + elog(ERROR, "invalid database ID"); if (MyDatabaseId == catalog.database_id) return &catalog; @@ -177,7 +177,7 @@ catalog_get(void) catalog.owner_uid = catalog_owner(); if (catalog.schema_id == InvalidOid) - elog(ERROR, "Oid lookup failed for schema %s", CATALOG_SCHEMA_NAME); + elog(ERROR, "OID lookup failed for schema \"%s\"", CATALOG_SCHEMA_NAME); for (i = 0; i < _MAX_CATALOG_TABLES; i++) { @@ -189,7 +189,7 @@ catalog_get(void) id = get_relname_relid(catalog_table_names[i], catalog.schema_id); if (id == InvalidOid) - elog(ERROR, "Oid lookup failed for table %s", catalog_table_names[i]); + elog(ERROR, "OID lookup failed for table \"%s\"", catalog_table_names[i]); catalog.tables[i].id = id; @@ -202,7 +202,7 @@ catalog_get(void) catalog.schema_id); if (id == InvalidOid) - elog(ERROR, "Oid lookup failed for table index %s", + elog(ERROR, "OID lookup failed for table index \"%s\"", catalog_table_index_definitions[i].names[j]); catalog.tables[i].index_ids[j] = id; @@ -239,7 +239,7 @@ catalog_get(void) def.args, NULL, false, false, false); if (funclist == NULL || funclist->next) - elog(ERROR, "Oid lookup failed for the function %s with %d args", def.name, def.args); + elog(ERROR, "OID lookup failed for the function \"%s\" with %d args", def.name, def.args); catalog.functions[i].function_id = funclist->oid; } @@ -366,7 +366,7 @@ catalog_table_next_seq_id(Catalog *catalog, CatalogTable table) Oid relid = catalog->tables[table].serial_relid; if (!OidIsValid(relid)) - elog(ERROR, "No serial id column for table %s", catalog_table_names[table]); + elog(ERROR, "no serial ID column for table \"%s\"", catalog_table_names[table]); return DatumGetInt64(DirectFunctionCall1(nextval_oid, ObjectIdGetDatum(relid))); } diff --git a/src/chunk.c b/src/chunk.c index 3cf28d2f1..ec578a35b 100644 --- a/src/chunk.c +++ b/src/chunk.c @@ -464,7 +464,7 @@ chunk_create_after_lock(Hypertable *ht, Point *p, const char *schema, const char chunk->table_id = chunk_create_table(chunk, ht); if (!OidIsValid(chunk->table_id)) - elog(ERROR, "Could not create chunk table"); + elog(ERROR, "could not create chunk table"); /* Create the chunk's constraints, triggers, and indexes */ chunk_constraints_create(chunk->constraints, @@ -571,7 +571,7 @@ chunk_fill_stub(Chunk *chunk_stub, bool tuplock) num_found = scanner_scan(&ctx); if (num_found != 1) - elog(ERROR, "No chunk found with ID %d", chunk_stub->fd.id); + elog(ERROR, "no chunk found with ID %d", chunk_stub->fd.id); if (NULL == chunk_stub->cube) chunk_stub->cube = hypercube_from_constraints(chunk_stub->constraints, CurrentMemoryContext); diff --git a/src/chunk_constraint.c b/src/chunk_constraint.c index 722ba168e..e5e877532 100644 --- a/src/chunk_constraint.c +++ b/src/chunk_constraint.c @@ -469,7 +469,7 @@ chunk_constraint_scan_by_chunk_id(int32 chunk_id, Size num_constraints_hint, Mem mctx); if (num_found != constraints->num_constraints) - elog(ERROR, "Unexpected number of constraints found for chunk %d", chunk_id); + elog(ERROR, "unexpected number of constraints found for chunk ID %d", chunk_id); return constraints; } diff --git a/src/chunk_dispatch.c b/src/chunk_dispatch.c index 21ad8b5bb..5a4fcd221 100644 --- a/src/chunk_dispatch.c +++ b/src/chunk_dispatch.c @@ -57,7 +57,7 @@ chunk_dispatch_get_chunk_insert_state(ChunkDispatch *dispatch, Point *point) new_chunk = hypertable_get_chunk(dispatch->hypertable, point); if (NULL == new_chunk) - elog(ERROR, "No chunk found or created"); + elog(ERROR, "no chunk found or created"); cis = chunk_insert_state_create(new_chunk, dispatch); subspace_store_add(dispatch->cache, new_chunk->cube, cis, destroy_chunk_insert_state); diff --git a/src/chunk_dispatch_info.c b/src/chunk_dispatch_info.c index cbedc6ff6..aea995e23 100644 --- a/src/chunk_dispatch_info.c +++ b/src/chunk_dispatch_info.c @@ -46,7 +46,7 @@ chunk_dispatch_info_read(struct ExtensibleNode *node) token = pg_strtok(&length); if (token == NULL) - elog(ERROR, "Missing hypertable relation ID"); + elog(ERROR, "missing hypertable relation ID"); info->hypertable_relid = strtol(token, NULL, 10); @@ -54,7 +54,7 @@ chunk_dispatch_info_read(struct ExtensibleNode *node) token = pg_strtok(&length); if (token == NULL) - elog(ERROR, "Missing Query node"); + elog(ERROR, "missing query node"); } static ExtensibleNodeMethods chunk_dispatch_info_methods = { diff --git a/src/chunk_dispatch_state.c b/src/chunk_dispatch_state.c index 80e4544b5..0808970f5 100644 --- a/src/chunk_dispatch_state.c +++ b/src/chunk_dispatch_state.c @@ -30,7 +30,7 @@ chunk_dispatch_begin(CustomScanState *node, EState *estate, int eflags) if (NULL == ht) { cache_release(hypertable_cache); - elog(ERROR, "No hypertable for relid %d", state->hypertable_relid); + elog(ERROR, "no hypertable for relid %d", state->hypertable_relid); } ps = ExecInitNode(state->subplan, estate, eflags); state->hypertable_cache = hypertable_cache; diff --git a/src/chunk_index.c b/src/chunk_index.c index f6611a4d8..59e966469 100644 --- a/src/chunk_index.c +++ b/src/chunk_index.c @@ -128,13 +128,13 @@ chunk_adjust_expr_attnos(IndexInfo *ii, Relation htrel, Relation idxrel, Relatio Name attname = find_attname_by_attno(htrel->rd_att, var->varattno); if (NULL == attname) - elog(ERROR, "Index expression var %u not found in chunk", var->varattno); + elog(ERROR, "index expression var %u not found in chunk", var->varattno); /* Adjust the Var's attno to match the chunk's attno */ var->varattno = find_attno_by_attname(chunkrel->rd_att, attname); if (var->varattno == InvalidAttrNumber) - elog(ERROR, "Index attribute %s not found in chunk", NameStr(*attname)); + elog(ERROR, "index attribute %s not found in chunk", NameStr(*attname)); } } } @@ -153,7 +153,7 @@ chunk_adjust_colref_attnos(IndexInfo *ii, Relation idxrel, Relation chunkrel) AttrNumber attno = find_attno_by_attname(chunkrel->rd_att, &idxattr->attname); if (attno == InvalidAttrNumber) - elog(ERROR, "Index attribute %s not found in chunk", + elog(ERROR, "index attribute %s not found in chunk", NameStr(idxattr->attname)); ii->ii_KeyAttrNumbers[i] = attno; diff --git a/src/chunk_insert_state.c b/src/chunk_insert_state.c index a6040a823..0795704bb 100644 --- a/src/chunk_insert_state.c +++ b/src/chunk_insert_state.c @@ -299,7 +299,7 @@ get_adjusted_projection_info_onconflicupdate(ProjectionInfo *orig, List *update_ attribute = chunk_desc->attrs[i]; if (namestrcmp(&attribute->attname, t->resname) != 0) - elog(ERROR, "invalid translation of on conflict update statements"); + elog(ERROR, "invalid translation of ON CONFLICT update statements"); t->resno = i + 1; i++; @@ -429,7 +429,7 @@ chunk_insert_state_create(Chunk *chunk, ChunkDispatch *dispatch) if (check_enable_rls(chunk->table_id, InvalidOid, false) == RLS_ENABLED) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("Hypertables don't support row-level security"))); + errmsg("hypertables do not support row-level security"))); /* * We must allocate the range table entry on the executor's per-query @@ -462,7 +462,7 @@ chunk_insert_state_create(Chunk *chunk, ChunkDispatch *dispatch) if (resrelinfo->ri_TrigDesc->trig_insert_instead_row || resrelinfo->ri_TrigDesc->trig_insert_after_statement || resrelinfo->ri_TrigDesc->trig_insert_before_statement) - elog(ERROR, "Insert trigger on chunk table not supported"); + elog(ERROR, "insert trigger on chunk table not supported"); } /* Set the chunk's arbiter indexes for ON CONFLICT statements */ diff --git a/src/constraint_aware_append.c b/src/constraint_aware_append.c index 9ef17a55b..6bf5a5acc 100644 --- a/src/constraint_aware_append.c +++ b/src/constraint_aware_append.c @@ -155,7 +155,7 @@ ca_append_begin(CustomScanState *node, EState *estate, int eflags) */ return; default: - elog(ERROR, "Invalid plan %d", nodeTag(subplan)); + elog(ERROR, "invalid plan %d", nodeTag(subplan)); } forboth(lc_plan, old_appendplans, lc_info, append_rel_info) @@ -416,7 +416,7 @@ constraint_aware_append_path_create(PlannerInfo *root, Hypertable *ht, Path *sub break; } default: - elog(ERROR, "Invalid node type %u", nodeTag(subpath)); + elog(ERROR, "invalid node type %u", nodeTag(subpath)); break; } diff --git a/src/dimension.c b/src/dimension.c index 5c91e45ad..2ea45d3e0 100644 --- a/src/dimension.c +++ b/src/dimension.c @@ -163,7 +163,7 @@ create_range_datum(FunctionCallInfo fcinfo, DimensionSlice *slice) HeapTuple tuple; if (get_call_result_type(fcinfo, NULL, &tupdesc) != TYPEFUNC_COMPOSITE) - elog(ERROR, "Function returning record called in context that cannot accept type record"); + elog(ERROR, "function returning record called in context that cannot accept type record"); tupdesc = BlessTupleDesc(tupdesc); @@ -241,7 +241,7 @@ calculate_closed_range_default(Dimension *dim, int64 value) int64 last_start = interval * (dim->fd.num_slices - 1); if (value < 0) - elog(ERROR, "Invalid value " INT64_FORMAT " for closed dimension", value); + elog(ERROR, "invalid value " INT64_FORMAT " for closed dimension", value); if (value >= last_start) { @@ -560,9 +560,9 @@ hyperspace_calculate_point(Hyperspace *hs, HeapTuple tuple, TupleDesc tupdesc) if (isnull) ereport(ERROR, (errcode(ERRCODE_NOT_NULL_VIOLATION), - errmsg("null value in column \"%s\" violates not-null constraint", + errmsg("NULL value in column \"%s\" violates not-null constraint", NameStr(d->fd.column_name)), - errhint("Columns used for time partitioning can not be NULL"))); + errhint("Columns used for time partitioning cannot be NULL"))); p->coordinates[p->num_coords++] = time_value_to_internal(datum, d->fd.column_type, false); } @@ -699,7 +699,7 @@ dimension_add_not_null_on_column(Oid table_relid, char *colname) }; ereport(NOTICE, - (errmsg("adding NOT NULL constraint to column \"%s\"", colname), + (errmsg("adding not-null constraint to column \"%s\"", colname), errdetail("Time dimensions cannot have NULL values"))); AlterTableInternal(table_relid, list_make1(&cmd), false); diff --git a/src/event_trigger.c b/src/event_trigger.c index d0e2af68b..d1fd69895 100644 --- a/src/event_trigger.c +++ b/src/event_trigger.c @@ -89,7 +89,7 @@ extract_addrnames(ArrayType *arr) for (i = 0; i < nelems; i++) { if (nulls[i]) - elog(ERROR, "unexpected null in name list"); + elog(ERROR, "unexpected NULL in name list"); /* TextDatumGetCString heap allocates the string */ list = lappend(list, TextDatumGetCString(elems[i])); diff --git a/src/hypertable_cache.c b/src/hypertable_cache.c index 1d5db0b3c..7ed17f0be 100644 --- a/src/hypertable_cache.c +++ b/src/hypertable_cache.c @@ -108,7 +108,7 @@ hypertable_cache_create_entry(Cache *cache, CacheQuery *query) Assert(strncmp(cache_entry->hypertable->fd.table_name.data, hq->table, NAMEDATALEN) == 0); break; default: - elog(ERROR, "Got an unexpected number of records: %d", number_found); + elog(ERROR, "got an unexpected number of records: %d", number_found); break; } diff --git a/src/plan_add_hashagg.c b/src/plan_add_hashagg.c index 2c9e57cce..c821e7be7 100644 --- a/src/plan_add_hashagg.c +++ b/src/plan_add_hashagg.c @@ -152,7 +152,7 @@ initialize_custom_estimate_func_info() } if (!function_found) - elog(ERROR, "cache lookup failed for function %s with %d args", + elog(ERROR, "cache lookup failed for function \"%s\" with %d args", def.function_name, def.nargs); custom_estimate_func_info[i].function_oid = funclist->oid; diff --git a/src/planner.c b/src/planner.c index 63fec8d4e..b85e8acdf 100644 --- a/src/planner.c +++ b/src/planner.c @@ -146,7 +146,7 @@ modifytable_plan_walker(Plan **planptr, void *pctx) ctx->parse->onConflict->constraint != InvalidOid) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("Hypertables do not support ON CONFLICT statements that reference constraints"), + errmsg("hypertables do not support ON CONFLICT statements that reference constraints"), errhint("Use column names to infer indexes instead."))); /* diff --git a/src/process_utility.c b/src/process_utility.c index eec0e3f86..072bcbae4 100644 --- a/src/process_utility.c +++ b/src/process_utility.c @@ -123,7 +123,7 @@ check_chunk_operation_allowed(Oid relid) { ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("Operation not supported on chunk tables."))); + errmsg("operation not supported on chunk tables"))); } } @@ -451,7 +451,7 @@ process_drop_hypertable_chunks(DropStmt *stmt) if (NULL != ht) { if (list_length(stmt->objects) != 1) - elog(ERROR, "Cannot drop a hypertable along with other objects"); + elog(ERROR, "cannot drop a hypertable along with other objects"); /* Drop each chunk table */ foreach_chunk(ht, process_drop_table_chunk, stmt); @@ -619,7 +619,7 @@ process_reindex(Node *parsetree) */ ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("Reindexing of a specific index on a hypertable is currently unsupported."), + errmsg("reindexing of a specific index on a hypertable is unsupported"), errhint("As a workaround, it is possible to run REINDEX TABLE to reindex all " "indexes on a hypertable, including all indexes on chunks."))); } @@ -730,7 +730,7 @@ process_rename_constraint(Cache *hcache, Oid relid, RenameStmt *stmt) if (NULL != chunk) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("Renaming constraints on chunks is not supported"))); + errmsg("renaming constraints on chunks is not supported"))); } } @@ -826,7 +826,7 @@ process_altertable_drop_not_null(Hypertable *ht, AlterTableCmd *cmd) strncmp(NameStr(dim->fd.column_name), cmd->name, NAMEDATALEN) == 0) ereport(ERROR, (errcode(ERRCODE_IO_OPERATION_NOT_SUPPORTED), - errmsg("Cannot Drop NOT NULL constraint from a time-partitioned column"))); + errmsg("cannot drop not-null constraint from a time-partitioned column"))); } } @@ -850,7 +850,7 @@ verify_constraint_plaintable(RangeVar *relation, Constraint *constr) if (NULL != ht) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("Foreign keys to hypertables are not supported."))); + errmsg("foreign keys to hypertables are not supported"))); break; default: break; @@ -887,7 +887,7 @@ verify_constraint_hypertable(Hypertable *ht, Node *constr_node) } else { - elog(ERROR, "Unexpected constraint type"); + elog(ERROR, "unexpected constraint type"); return; } @@ -982,8 +982,8 @@ process_index_start(Node *parsetree) if (stmt->concurrent) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("Hypertables currently do not support concurrent " - "index creation."))); + errmsg("hypertables do not support concurrent " + "index creation"))); indexing_verify_index(ht->space, stmt); } @@ -1017,9 +1017,11 @@ process_index_end(Node *parsetree, CollectedCommand *cmd) info.obj = cmd->d.simple.address; break; default: - elog(ERROR, - "%s:%d Operation not yet supported on hypertables: parsetree %s, type %d", - __FILE__, __LINE__, nodeToString(parsetree), cmd->type); + ereport(ERROR, + (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), + errmsg("hypertables do not support this operation: " + "parsetree %s, type %d", + nodeToString(parsetree), cmd->type))); break; } @@ -1267,7 +1269,7 @@ process_alter_column_type_start(Hypertable *ht, AlterTableCmd *cmd) strncmp(NameStr(dim->fd.column_name), cmd->name, NAMEDATALEN) == 0) ereport(ERROR, (errcode(ERRCODE_IO_OPERATION_NOT_SUPPORTED), - errmsg("Cannot change the type of a hash-partitioned column"))); + errmsg("cannot change the type of a hash-partitioned column"))); } } @@ -1406,7 +1408,8 @@ process_altertable_start_table(Node *parsetree) { ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("Hypertables do not support native postgres partitioning"))); + errmsg("hypertables do not support native " + "postgres partitioning"))); } } #endif @@ -1448,8 +1451,8 @@ process_altertable_end_subcmd(Hypertable *ht, Node *parsetree, ObjectAddress *ob case AT_AddIndexConstraint: ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("Hypertables currently do not support adding " - "a constraint using an existing index."))); + errmsg("hypertables do not support adding a constraint " + "using an existing index"))); break; case AT_AddIndex: { @@ -1605,7 +1608,7 @@ process_create_trigger_start(Node *parsetree) if (stmt->transitionRels != NIL) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("Hypertables do not support transition tables in triggers."))); + errmsg("hypertables do not support transition tables in triggers"))); #endif } diff --git a/src/scanner.c b/src/scanner.c index 52e6d9816..7437bb227 100644 --- a/src/scanner.c +++ b/src/scanner.c @@ -244,7 +244,7 @@ scanner_scan_one(ScannerCtx *ctx, bool fail_if_not_found, char *item_type) case 1: return true; default: - elog(ERROR, "More than one %s found.", item_type); + elog(ERROR, "more than one %s found", item_type); return false; } } diff --git a/src/trigger.c b/src/trigger.c index 047145824..721ad062e 100644 --- a/src/trigger.c +++ b/src/trigger.c @@ -37,7 +37,7 @@ trigger_by_name_relation(Relation rel, const char *trigname, bool missing_ok) } if (!missing_ok && NULL == trigger) - elog(ERROR, "No trigger %s for relation %s", + elog(ERROR, "no trigger \"%s\" for relation \"%s\"", trigname, get_rel_name(rel->rd_id)); return trigger; @@ -145,7 +145,7 @@ create_trigger_handler(Trigger *trigger, void *arg) TRIGGER_USES_TRANSITION_TABLE(trigger->tgoldtable)) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("Hypertables do not support transition tables in triggers."))); + errmsg("hypertables do not support transition tables in triggers"))); #endif if (trigger_is_chunk_trigger(trigger)) trigger_create_on_chunk(trigger->tgoid, @@ -178,7 +178,7 @@ trigger_create_all_on_chunk(Hypertable *ht, Chunk *chunk) tuple = SearchSysCache1(RELOID, ObjectIdGetDatum(ht->main_table_relid)); if (!HeapTupleIsValid(tuple)) - elog(ERROR, "cache lookup failed for relation %u", ht->main_table_relid); + elog(ERROR, "cache lookup failed for relation ID %u", ht->main_table_relid); form = (Form_pg_class) GETSTRUCT(tuple); diff --git a/src/utils.c b/src/utils.c index 8fd1d05f9..3e2a64a72 100644 --- a/src/utils.c +++ b/src/utils.c @@ -196,7 +196,7 @@ time_value_to_internal(Datum time_val, Oid type_oid, bool failure_ok) return DatumGetInt64(res); default: if (!failure_ok) - elog(ERROR, "unkown time type oid '%d'", type_oid); + elog(ERROR, "unkown time type OID %d", type_oid); return -1; } } @@ -231,7 +231,7 @@ create_fmgr(char *schema, char *function_name, int num_args) if (func_list == NULL) { - elog(ERROR, "couldn't find the function %s.%s", schema, function_name); + elog(ERROR, "could not find the function \"%s.%s\"", schema, function_name); } if (func_list->next != NULL) { @@ -395,7 +395,7 @@ get_interval_period_approx(Interval *interval) #define DAYS_PER_QUARTER 89 #define YEARS_PER_DECADE 10 #define YEARS_PER_CENTURY 100 -#define YEARS_PER_MILLENNIUM 1000 +#define YEARS_PER_MILLENNIUM 1000 /* Returns approximate period in microseconds */ int64 diff --git a/test/expected/agg_bookends.out b/test/expected/agg_bookends.out index fc0d0c3cd..b820df082 100644 --- a/test/expected/agg_bookends.out +++ b/test/expected/agg_bookends.out @@ -1,6 +1,6 @@ CREATE TABLE "btest"(time timestamp, time_alt timestamp, gp INTEGER, temp float, strid TEXT DEFAULT 'testing'); SELECT create_hypertable('"btest"', 'time'); -NOTICE: adding NOT NULL constraint to column "time" +NOTICE: adding not-null constraint to column "time" create_hypertable ------------------- @@ -132,7 +132,7 @@ CREATE TABLE btest_numeric quantity numeric ); SELECT create_hypertable('btest_numeric', 'time'); -NOTICE: adding NOT NULL constraint to column "time" +NOTICE: adding not-null constraint to column "time" create_hypertable ------------------- diff --git a/test/expected/alter.out b/test/expected/alter.out index 926466abc..dc8da5068 100644 --- a/test/expected/alter.out +++ b/test/expected/alter.out @@ -2,7 +2,7 @@ CREATE TABLE alter_before(id serial, time timestamp, temp float, colorid integer); ALTER TABLE alter_before DROP COLUMN id; SELECT create_hypertable('alter_before', 'time', chunk_time_interval => 2628000000000); -NOTICE: adding NOT NULL constraint to column "time" +NOTICE: adding not-null constraint to column "time" create_hypertable ------------------- @@ -36,7 +36,7 @@ ORDER BY c.relname, a.attnum; -- DROP a table's column after making it a hypertable and having data CREATE TABLE alter_after(id serial, time timestamp, temp float, colorid integer); SELECT create_hypertable('alter_after', 'time', chunk_time_interval => 2628000000000); -NOTICE: adding NOT NULL constraint to column "time" +NOTICE: adding not-null constraint to column "time" create_hypertable ------------------- diff --git a/test/expected/alternate_users.out b/test/expected/alternate_users.out index 1d8b271ba..bdff2cb3f 100644 --- a/test/expected/alternate_users.out +++ b/test/expected/alternate_users.out @@ -66,7 +66,7 @@ ERROR: tablespace "tablespace1" does not exist \set ON_ERROR_STOP 1 CREATE TABLE "1dim"(time timestamp, temp float); SELECT create_hypertable('"1dim"', 'time'); -NOTICE: adding NOT NULL constraint to column "time" +NOTICE: adding not-null constraint to column "time" create_hypertable ------------------- @@ -188,7 +188,7 @@ DELETE FROM ONLY PUBLIC."Hypertable_1" WHERE "Device_id" = 'dev1'; \set ON_ERROR_STOP 1 CREATE TABLE my_ht (time BIGINT, val integer); SELECT * FROM create_hypertable('my_ht', 'time', chunk_time_interval=>_timescaledb_internal.interval_to_usec('1 month')); -psql:include/ddl_ops_1.sql:62: NOTICE: adding NOT NULL constraint to column "time" +psql:include/ddl_ops_1.sql:62: NOTICE: adding not-null constraint to column "time" create_hypertable ------------------- @@ -423,7 +423,7 @@ ALTER TABLE PUBLIC."Hypertable_1" ADD COLUMN sensor_4 BIGINT NOT NULL DEFAULT 13 CREATE TABLE plain_table_su (time timestamp, temp float); CREATE TABLE hypertable_su (time timestamp, temp float); SELECT create_hypertable('hypertable_su', 'time'); -NOTICE: adding NOT NULL constraint to column "time" +NOTICE: adding not-null constraint to column "time" create_hypertable ------------------- diff --git a/test/expected/append.out b/test/expected/append.out index b63ecb50c..6123cec5c 100644 --- a/test/expected/append.out +++ b/test/expected/append.out @@ -28,7 +28,7 @@ END; $BODY$; CREATE TABLE append_test(time timestamptz, temp float, colorid integer); SELECT create_hypertable('append_test', 'time', chunk_time_interval => 2628000000000); -psql:include/append.sql:31: NOTICE: adding NOT NULL constraint to column "time" +psql:include/append.sql:31: NOTICE: adding not-null constraint to column "time" create_hypertable ------------------- @@ -415,7 +415,7 @@ psql:include/append.sql:166: NOTICE: Stable function now_s() called! -- Create another hypertable to join with CREATE TABLE join_test(time timestamptz, temp float, colorid integer); SELECT create_hypertable('join_test', 'time', chunk_time_interval => 2628000000000); -psql:include/append.sql:172: NOTICE: adding NOT NULL constraint to column "time" +psql:include/append.sql:172: NOTICE: adding not-null constraint to column "time" create_hypertable ------------------- diff --git a/test/expected/append_unoptimized.out b/test/expected/append_unoptimized.out index 0fd676ece..5b0808b4e 100644 --- a/test/expected/append_unoptimized.out +++ b/test/expected/append_unoptimized.out @@ -28,7 +28,7 @@ END; $BODY$; CREATE TABLE append_test(time timestamptz, temp float, colorid integer); SELECT create_hypertable('append_test', 'time', chunk_time_interval => 2628000000000); -psql:include/append.sql:31: NOTICE: adding NOT NULL constraint to column "time" +psql:include/append.sql:31: NOTICE: adding not-null constraint to column "time" create_hypertable ------------------- @@ -445,7 +445,7 @@ psql:include/append.sql:166: NOTICE: Stable function now_s() called! -- Create another hypertable to join with CREATE TABLE join_test(time timestamptz, temp float, colorid integer); SELECT create_hypertable('join_test', 'time', chunk_time_interval => 2628000000000); -psql:include/append.sql:172: NOTICE: adding NOT NULL constraint to column "time" +psql:include/append.sql:172: NOTICE: adding not-null constraint to column "time" create_hypertable ------------------- diff --git a/test/expected/cluster.out b/test/expected/cluster.out index 066040b85..10e995ad6 100644 --- a/test/expected/cluster.out +++ b/test/expected/cluster.out @@ -1,6 +1,6 @@ CREATE TABLE cluster_test(time timestamptz, temp float, location int); SELECT create_hypertable('cluster_test', 'time', chunk_time_interval => interval '1 day'); -NOTICE: adding NOT NULL constraint to column "time" +NOTICE: adding not-null constraint to column "time" create_hypertable ------------------- diff --git a/test/expected/constraint.out b/test/expected/constraint.out index 96c59ebf8..acf79505b 100644 --- a/test/expected/constraint.out +++ b/test/expected/constraint.out @@ -18,7 +18,7 @@ INSERT INTO hyper(time, device_id,sensor_1) VALUES (1257987700000000000, NULL, 11); ERROR: null value in column "device_id" violates not-null constraint ALTER TABLE hyper ALTER COLUMN time DROP NOT NULL; -ERROR: Cannot Drop NOT NULL constraint from a time-partitioned column +ERROR: cannot drop not-null constraint from a time-partitioned column ALTER TABLE ONLY hyper ALTER COLUMN sensor_1 SET NOT NULL; ERROR: ONLY option not supported on hypertable operations ALTER TABLE ONLY hyper ALTER COLUMN device_id DROP NOT NULL; @@ -189,7 +189,7 @@ ALTER TABLE hyper_unique_with_looooooooooooooooooooooooooooooooooooong_name ADD CONSTRAINT hyper_unique_with_looooooooooooooooooooooooooooooooooo_time_key UNIQUE USING INDEX hyper_unique_with_looooooooooooooooooooooooooooooooo_time_idx; NOTICE: ALTER TABLE / ADD CONSTRAINT USING INDEX will rename index "hyper_unique_with_looooooooooooooooooooooooooooooooo_time_idx" to "hyper_unique_with_looooooooooooooooooooooooooooooooooo_time_key" -ERROR: Hypertables currently do not support adding a constraint using an existing index. +ERROR: hypertables do not support adding a constraint using an existing index \set ON_ERROR_STOP 1 DROP INDEX hyper_unique_with_looooooooooooooooooooooooooooooooo_time_idx; --now can create @@ -265,7 +265,7 @@ RENAME CONSTRAINT new_name2 TO new_name; ERROR: ONLY option not supported on hypertable operations ALTER TABLE _timescaledb_internal._hyper_2_4_chunk RENAME CONSTRAINT "4_10_new_name2" TO new_name; -ERROR: Renaming constraints on chunks is not supported +ERROR: renaming constraints on chunks is not supported \set ON_ERROR_STOP 1 ----------------------- PRIMARY KEY ------------------ CREATE TABLE hyper_pk ( @@ -472,7 +472,7 @@ SELECT * FROM create_hypertable('hyper_for_ref', 'time', chunk_time_interval => CREATE TABLE referrer ( time BIGINT NOT NULL REFERENCES hyper_for_ref(time) ); -ERROR: Foreign keys to hypertables are not supported. +ERROR: foreign keys to hypertables are not supported \set ON_ERROR_STOP 1 CREATE TABLE referrer2 ( time BIGINT NOT NULL @@ -480,7 +480,7 @@ CREATE TABLE referrer2 ( \set ON_ERROR_STOP 0 ALTER TABLE referrer2 ADD CONSTRAINT hyper_fk_device_id_fkey FOREIGN KEY (time) REFERENCES hyper_for_ref(time); -ERROR: Foreign keys to hypertables are not supported. +ERROR: foreign keys to hypertables are not supported \set ON_ERROR_STOP 1 ----------------------- EXCLUSION CONSTRAINT ------------------ CREATE TABLE hyper_ex ( @@ -493,7 +493,7 @@ CREATE TABLE hyper_ex ( ) WHERE (not canceled) ); SELECT * FROM create_hypertable('hyper_ex', 'time', chunk_time_interval=>_timescaledb_internal.interval_to_usec('1 month')); -NOTICE: adding NOT NULL constraint to column "time" +NOTICE: adding not-null constraint to column "time" create_hypertable ------------------- @@ -542,6 +542,6 @@ CREATE TABLE hyper_ex_invalid ( ); \set ON_ERROR_STOP 0 SELECT * FROM create_hypertable('hyper_ex_invalid', 'time', chunk_time_interval=>_timescaledb_internal.interval_to_usec('1 month')); -NOTICE: adding NOT NULL constraint to column "time" +NOTICE: adding not-null constraint to column "time" ERROR: cannot create a unique index without the column "time" (used in partitioning) \set ON_ERROR_STOP 1 diff --git a/test/expected/create_chunks.out b/test/expected/create_chunks.out index 5d22048bc..674f4f34b 100644 --- a/test/expected/create_chunks.out +++ b/test/expected/create_chunks.out @@ -24,7 +24,7 @@ -- CREATE TABLE chunk_test(time integer, temp float8, tag integer, color integer); SELECT create_hypertable('chunk_test', 'time', 'tag', 2, chunk_time_interval => 3); -NOTICE: adding NOT NULL constraint to column "time" +NOTICE: adding not-null constraint to column "time" create_hypertable ------------------- @@ -119,7 +119,7 @@ ORDER BY c.id, d.id; --test the edges of an open partition -- INT_64_MAX and INT_64_MIN. CREATE TABLE chunk_test_ends(time bigint, temp float8, tag integer, color integer); SELECT create_hypertable('chunk_test_ends', 'time', chunk_time_interval => 5); -NOTICE: adding NOT NULL constraint to column "time" +NOTICE: adding not-null constraint to column "time" create_hypertable ------------------- @@ -149,7 +149,7 @@ SELECT * FROM chunk_test_ends ORDER BY time asc; CREATE TABLE chunk_test2(time TIMESTAMPTZ, temp float8, tag integer, color integer); SELECT create_hypertable('chunk_test2', 'time', 'tag', 2, chunk_time_interval => 3); WARNING: unexpected interval: smaller than one second -NOTICE: adding NOT NULL constraint to column "time" +NOTICE: adding not-null constraint to column "time" create_hypertable ------------------- diff --git a/test/expected/create_hypertable.out b/test/expected/create_hypertable.out index f90b4c486..94d2fe593 100644 --- a/test/expected/create_hypertable.out +++ b/test/expected/create_hypertable.out @@ -6,7 +6,7 @@ create table test_schema.test_table(time BIGINT, temp float8, device_id text, de \set ON_ERROR_STOP 0 -- get_create_command should fail since hypertable isn't made yet SELECT * FROM _timescaledb_internal.get_create_command('test_table'); -ERROR: hypertable test_table not found +ERROR: hypertable "test_table" not found \set ON_ERROR_STOP 1 \dt "test_schema".* List of relations @@ -33,7 +33,7 @@ RESET ROLE; GRANT :ROLE_DEFAULT_PERM_USER TO :ROLE_DEFAULT_PERM_USER_2; SET ROLE :ROLE_DEFAULT_PERM_USER_2; select * from create_hypertable('test_schema.test_table_no_not_null', 'time', 'device_id', 2, chunk_time_interval=>_timescaledb_internal.interval_to_usec('1 month')); -NOTICE: adding NOT NULL constraint to column "time" +NOTICE: adding not-null constraint to column "time" create_hypertable ------------------- @@ -41,7 +41,7 @@ NOTICE: adding NOT NULL constraint to column "time" \set ON_ERROR_STOP 0 insert into test_schema.test_table_no_not_null (device_id) VALUES('foo'); -ERROR: null value in column "time" violates not-null constraint +ERROR: NULL value in column "time" violates not-null constraint \set ON_ERROR_STOP 1 insert into test_schema.test_table_no_not_null (time, device_id) VALUES(1, 'foo'); RESET ROLE; @@ -56,7 +56,7 @@ RESET ROLE; GRANT CREATE ON SCHEMA chunk_schema TO :ROLE_DEFAULT_PERM_USER; SET ROLE :ROLE_DEFAULT_PERM_USER; select * from create_hypertable('test_schema.test_table', 'time', 'device_id', 2, chunk_time_interval=>_timescaledb_internal.interval_to_usec('1 month'), associated_schema_name => 'chunk_schema'); -NOTICE: adding NOT NULL constraint to column "time" +NOTICE: adding not-null constraint to column "time" create_hypertable ------------------- @@ -132,7 +132,7 @@ ERROR: get_create_command only supports hypertables with up to 2 dimensions \set ON_ERROR_STOP 1 --test adding one more open dimension select add_dimension('test_schema.test_table', 'id', chunk_time_interval => 1000); -NOTICE: adding NOT NULL constraint to column "id" +NOTICE: adding not-null constraint to column "id" add_dimension --------------- @@ -158,14 +158,14 @@ select * from _timescaledb_catalog.dimension; -- Test add_dimension: can use interval types for TIMESTAMPTZ columns CREATE TABLE dim_test_time(time TIMESTAMPTZ, time2 TIMESTAMPTZ, time3 BIGINT, temp float8, device int, location int); SELECT create_hypertable('dim_test_time', 'time'); -NOTICE: adding NOT NULL constraint to column "time" +NOTICE: adding not-null constraint to column "time" create_hypertable ------------------- (1 row) SELECT add_dimension('dim_test_time', 'time2', chunk_time_interval => INTERVAL '1 day'); -NOTICE: adding NOT NULL constraint to column "time2" +NOTICE: adding not-null constraint to column "time2" add_dimension --------------- @@ -180,7 +180,7 @@ SELECT add_dimension('dim_test_time', 'time3', chunk_time_interval => 'foo'::TEX ERROR: invalid interval: must be an interval or integer type \set ON_ERROR_STOP 1 SELECT add_dimension('dim_test_time', 'time3', chunk_time_interval => 500); -NOTICE: adding NOT NULL constraint to column "time3" +NOTICE: adding not-null constraint to column "time3" add_dimension --------------- @@ -189,7 +189,7 @@ NOTICE: adding NOT NULL constraint to column "time3" -- Test add_dimension: integrals should work on TIMESTAMPTZ columns CREATE TABLE dim_test_time2(time TIMESTAMPTZ, time2 TIMESTAMPTZ, temp float8, device int, location int); SELECT create_hypertable('dim_test_time2', 'time'); -NOTICE: adding NOT NULL constraint to column "time" +NOTICE: adding not-null constraint to column "time" create_hypertable ------------------- @@ -197,7 +197,7 @@ NOTICE: adding NOT NULL constraint to column "time" SELECT add_dimension('dim_test_time2', 'time2', chunk_time_interval => 500); WARNING: unexpected interval: smaller than one second -NOTICE: adding NOT NULL constraint to column "time2" +NOTICE: adding not-null constraint to column "time2" add_dimension --------------- @@ -252,7 +252,7 @@ NOTICE: column "location" is already a dimension, skipping --test partitioning in only time dimension create table test_schema.test_1dim(time timestamp, temp float); select create_hypertable('test_schema.test_1dim', 'time'); -NOTICE: adding NOT NULL constraint to column "time" +NOTICE: adding not-null constraint to column "time" create_hypertable ------------------- @@ -315,7 +315,7 @@ select create_hypertable('test_schema.test_migrate', 'time'); ERROR: table "test_migrate" is not empty \set ON_ERROR_STOP 1 select create_hypertable('test_schema.test_migrate', 'time', migrate_data => true); -NOTICE: adding NOT NULL constraint to column "time" +NOTICE: adding not-null constraint to column "time" NOTICE: migrating data to chunks create_hypertable ------------------- @@ -366,7 +366,7 @@ select * from only _timescaledb_internal._hyper_6_5_chunk; create table test_schema.test_migrate_empty(time timestamp, temp float); select create_hypertable('test_schema.test_migrate_empty', 'time', migrate_data => true); -NOTICE: adding NOT NULL constraint to column "time" +NOTICE: adding not-null constraint to column "time" create_hypertable ------------------- diff --git a/test/expected/create_table.out b/test/expected/create_table.out index b66edbe5c..432ce214a 100644 --- a/test/expected/create_table.out +++ b/test/expected/create_table.out @@ -11,5 +11,5 @@ SELECT create_hypertable('test_hyper_pk', 'time'); \set ON_ERROR_STOP 0 -- Foreign key constraints that reference hypertables are currently unsupported CREATE TABLE test_fk(time TIMESTAMPTZ REFERENCES test_hyper_pk(time)); -ERROR: Foreign keys to hypertables are not supported. +ERROR: foreign keys to hypertables are not supported \set ON_ERROR_STOP 1 diff --git a/test/expected/ddl.out b/test/expected/ddl.out index b458e1289..0df08f20c 100644 --- a/test/expected/ddl.out +++ b/test/expected/ddl.out @@ -85,7 +85,7 @@ DELETE FROM ONLY PUBLIC."Hypertable_1" WHERE "Device_id" = 'dev1'; \set ON_ERROR_STOP 1 CREATE TABLE my_ht (time BIGINT, val integer); SELECT * FROM create_hypertable('my_ht', 'time', chunk_time_interval=>_timescaledb_internal.interval_to_usec('1 month')); -psql:include/ddl_ops_1.sql:62: NOTICE: adding NOT NULL constraint to column "time" +psql:include/ddl_ops_1.sql:62: NOTICE: adding not-null constraint to column "time" create_hypertable ------------------- diff --git a/test/expected/ddl_alter_column.out b/test/expected/ddl_alter_column.out index d5878659b..7bb36de0f 100644 --- a/test/expected/ddl_alter_column.out +++ b/test/expected/ddl_alter_column.out @@ -1,7 +1,7 @@ CREATE TABLE alter_test(time timestamptz, temp float, color varchar(10)); -- create hypertable with two chunks SELECT create_hypertable('alter_test', 'time', 'color', 2, chunk_time_interval => 2628000000000); -NOTICE: adding NOT NULL constraint to column "time" +NOTICE: adding not-null constraint to column "time" create_hypertable ------------------- @@ -70,7 +70,7 @@ ALTER TABLE alter_test RENAME COLUMN color TO colorname; -- Changing types on hash-partitioned columns is not safe for some -- types and is therefore blocked. ALTER TABLE alter_test ALTER COLUMN colorname TYPE text; -ERROR: Cannot change the type of a hash-partitioned column +ERROR: cannot change the type of a hash-partitioned column \set ON_ERROR_STOP 1 SELECT * FROM test.show_columns('alter_test'); Column | Type | Nullable @@ -119,7 +119,7 @@ SELECT * FROM alter_test WHERE time_us > '2017-05-20T10:00:01'; \set ON_ERROR_STOP 0 -- verify that we cannot change the column type to something incompatible ALTER TABLE alter_test ALTER COLUMN colorname TYPE varchar(3); -ERROR: Cannot change the type of a hash-partitioned column +ERROR: cannot change the type of a hash-partitioned column -- conversion that messes up partitioning fails ALTER TABLE alter_test ALTER COLUMN time_us TYPE timestamptz USING time_us::timestamptz+INTERVAL '1 year'; ERROR: check constraint "constraint_1" is violated by some row diff --git a/test/expected/ddl_errors.out b/test/expected/ddl_errors.out index ac6158b46..101503023 100644 --- a/test/expected/ddl_errors.out +++ b/test/expected/ddl_errors.out @@ -31,5 +31,5 @@ ERROR: table "Hypertable_1" is already a hypertable INSERT INTO "Hypertable_1" VALUES (0, 1, 0); \set ON_ERROR_STOP 0 ALTER TABLE _timescaledb_internal._hyper_1_1_chunk ALTER COLUMN temp_c DROP NOT NULL; -ERROR: Operation not supported on chunk tables. +ERROR: operation not supported on chunk tables \set ON_ERROR_STOP 1 diff --git a/test/expected/ddl_single.out b/test/expected/ddl_single.out index 87ae9af4a..2d659ba18 100644 --- a/test/expected/ddl_single.out +++ b/test/expected/ddl_single.out @@ -85,7 +85,7 @@ DELETE FROM ONLY PUBLIC."Hypertable_1" WHERE "Device_id" = 'dev1'; \set ON_ERROR_STOP 1 CREATE TABLE my_ht (time BIGINT, val integer); SELECT * FROM create_hypertable('my_ht', 'time', chunk_time_interval=>_timescaledb_internal.interval_to_usec('1 month')); -psql:include/ddl_ops_1.sql:62: NOTICE: adding NOT NULL constraint to column "time" +psql:include/ddl_ops_1.sql:62: NOTICE: adding not-null constraint to column "time" create_hypertable ------------------- diff --git a/test/expected/drop_chunks.out b/test/expected/drop_chunks.out index e734e9e72..20cf43efd 100644 --- a/test/expected/drop_chunks.out +++ b/test/expected/drop_chunks.out @@ -3,21 +3,21 @@ CREATE TABLE PUBLIC.drop_chunk_test2(time bigint, temp float8, device_id text); CREATE TABLE PUBLIC.drop_chunk_test3(time bigint, temp float8, device_id text); CREATE INDEX ON drop_chunk_test1(time DESC); SELECT create_hypertable('public.drop_chunk_test1', 'time', chunk_time_interval => 1, create_default_indexes=>false); -NOTICE: adding NOT NULL constraint to column "time" +NOTICE: adding not-null constraint to column "time" create_hypertable ------------------- (1 row) SELECT create_hypertable('public.drop_chunk_test2', 'time', chunk_time_interval => 1, create_default_indexes=>false); -NOTICE: adding NOT NULL constraint to column "time" +NOTICE: adding not-null constraint to column "time" create_hypertable ------------------- (1 row) SELECT create_hypertable('public.drop_chunk_test3', 'time', chunk_time_interval => 1, create_default_indexes=>false); -NOTICE: adding NOT NULL constraint to column "time" +NOTICE: adding not-null constraint to column "time" create_hypertable ------------------- @@ -497,7 +497,7 @@ WHERE h.schema_name = 'public' AND (h.table_name = 'drop_chunk_test1' OR h.table -- should error because no hypertable \set ON_ERROR_STOP 0 SELECT drop_chunks(5, 'drop_chunk_test4'); -ERROR: No hypertables found +ERROR: no hypertables found \set ON_ERROR_STOP 1 DROP TABLE _timescaledb_internal._hyper_1_6_chunk; SELECT c.id AS chunk_id, c.hypertable_id, c.schema_name AS chunk_schema, c.table_name AS chunk_table, ds.range_start, ds.range_end @@ -535,7 +535,7 @@ WHERE h.schema_name = 'public' AND (h.table_name = 'drop_chunk_test1' OR h.table CREATE TABLE PUBLIC.drop_chunk_test_ts(time timestamp, temp float8, device_id text); SELECT create_hypertable('public.drop_chunk_test_ts', 'time', chunk_time_interval => interval '1 minute', create_default_indexes=>false); -NOTICE: adding NOT NULL constraint to column "time" +NOTICE: adding not-null constraint to column "time" create_hypertable ------------------- @@ -543,7 +543,7 @@ NOTICE: adding NOT NULL constraint to column "time" CREATE TABLE PUBLIC.drop_chunk_test_tstz(time timestamptz, temp float8, device_id text); SELECT create_hypertable('public.drop_chunk_test_tstz', 'time', chunk_time_interval => interval '1 minute', create_default_indexes=>false); -NOTICE: adding NOT NULL constraint to column "time" +NOTICE: adding not-null constraint to column "time" create_hypertable ------------------- @@ -614,17 +614,17 @@ BEGIN; ROLLBACK; \set ON_ERROR_STOP 0 SELECT drop_chunks(interval '1 minute'); -ERROR: Cannot use drop_chunks on multiple tables with different time types +ERROR: cannot use drop_chunks on multiple tables with different time types SELECT drop_chunks(interval '1 minute', 'drop_chunk_test3'); -ERROR: Can only use drop_chunks with an INTERVAL for TIMESTAMP, TIMESTAMPTZ, and DATE types +ERROR: can only use drop_chunks with an INTERVAL for TIMESTAMP, TIMESTAMPTZ, and DATE types SELECT drop_chunks(now()-interval '1 minute', 'drop_chunk_test_ts'); -ERROR: Cannot call drop_chunks with a timestamp with time zone on hypertables with a time type of: timestamp without time zone +ERROR: cannot call drop_chunks with a timestamp with time zone on hypertables with a time type of: timestamp without time zone SELECT drop_chunks(now()::timestamp-interval '1 minute', 'drop_chunk_test_tstz'); -ERROR: Cannot call drop_chunks with a timestamp without time zone on hypertables with a time type of: timestamp with time zone +ERROR: cannot call drop_chunks with a timestamp without time zone on hypertables with a time type of: timestamp with time zone \set ON_ERROR_STOP 1 CREATE TABLE PUBLIC.drop_chunk_test_date(time date, temp float8, device_id text); SELECT create_hypertable('public.drop_chunk_test_date', 'time', chunk_time_interval => interval '1 day', create_default_indexes=>false); -NOTICE: adding NOT NULL constraint to column "time" +NOTICE: adding not-null constraint to column "time" create_hypertable ------------------- diff --git a/test/expected/drop_extension.out b/test/expected/drop_extension.out index 5d225665e..f86d90d8d 100644 --- a/test/expected/drop_extension.out +++ b/test/expected/drop_extension.out @@ -1,6 +1,6 @@ CREATE TABLE drop_test(time timestamp, temp float8, device text); SELECT create_hypertable('drop_test', 'time', 'device', 2); -NOTICE: adding NOT NULL constraint to column "time" +NOTICE: adding not-null constraint to column "time" create_hypertable ------------------- diff --git a/test/expected/drop_hypertable.out b/test/expected/drop_hypertable.out index ad6b881e8..d6ec0e081 100644 --- a/test/expected/drop_hypertable.out +++ b/test/expected/drop_hypertable.out @@ -10,7 +10,7 @@ SELECT * from _timescaledb_catalog.dimension; CREATE TABLE should_drop (time timestamp, temp float8); SELECT create_hypertable('should_drop', 'time'); -NOTICE: adding NOT NULL constraint to column "time" +NOTICE: adding not-null constraint to column "time" create_hypertable ------------------- @@ -18,7 +18,7 @@ NOTICE: adding NOT NULL constraint to column "time" CREATE TABLE hyper_with_dependencies (time timestamp, temp float8); SELECT create_hypertable('hyper_with_dependencies', 'time'); -NOTICE: adding NOT NULL constraint to column "time" +NOTICE: adding not-null constraint to column "time" create_hypertable ------------------- @@ -40,7 +40,7 @@ NOTICE: drop cascades to view dependent_view CREATE TABLE chunk_with_dependencies (time timestamp, temp float8); SELECT create_hypertable('chunk_with_dependencies', 'time'); -NOTICE: adding NOT NULL constraint to column "time" +NOTICE: adding not-null constraint to column "time" create_hypertable ------------------- @@ -84,7 +84,7 @@ SELECT * from _timescaledb_catalog.dimension; DROP TABLE should_drop; CREATE TABLE should_drop (time timestamp, temp float8); SELECT create_hypertable('should_drop', 'time'); -NOTICE: adding NOT NULL constraint to column "time" +NOTICE: adding not-null constraint to column "time" create_hypertable ------------------- diff --git a/test/expected/drop_owned.out b/test/expected/drop_owned.out index a0360abb3..4d6607bbd 100644 --- a/test/expected/drop_owned.out +++ b/test/expected/drop_owned.out @@ -4,7 +4,7 @@ GRANT ALL ON SCHEMA hypertable_schema TO :ROLE_DEFAULT_PERM_USER; SET ROLE :ROLE_DEFAULT_PERM_USER; CREATE TABLE hypertable_schema.default_perm_user (time timestamptz, temp float, location int); SELECT create_hypertable('hypertable_schema.default_perm_user', 'time', 'location', 2); -NOTICE: adding NOT NULL constraint to column "time" +NOTICE: adding not-null constraint to column "time" create_hypertable ------------------- @@ -14,7 +14,7 @@ INSERT INTO hypertable_schema.default_perm_user VALUES ('2001-01-01 01:01:01', 2 RESET ROLE; CREATE TABLE hypertable_schema.superuser (time timestamptz, temp float, location int); SELECT create_hypertable('hypertable_schema.superuser', 'time', 'location', 2); -NOTICE: adding NOT NULL constraint to column "time" +NOTICE: adding not-null constraint to column "time" create_hypertable ------------------- diff --git a/test/expected/drop_schema.out b/test/expected/drop_schema.out index 7c7c9d6d1..22fa05165 100644 --- a/test/expected/drop_schema.out +++ b/test/expected/drop_schema.out @@ -11,14 +11,14 @@ CREATE TABLE hypertable_schema.test1 (time timestamptz, temp float, location int CREATE TABLE hypertable_schema.test2 (time timestamptz, temp float, location int); --create two identical tables with their own chunk schemas SELECT create_hypertable('hypertable_schema.test1', 'time', 'location', 2, associated_schema_name => 'chunk_schema1'); -NOTICE: adding NOT NULL constraint to column "time" +NOTICE: adding not-null constraint to column "time" create_hypertable ------------------- (1 row) SELECT create_hypertable('hypertable_schema.test2', 'time', 'location', 2, associated_schema_name => 'chunk_schema2'); -NOTICE: adding NOT NULL constraint to column "time" +NOTICE: adding not-null constraint to column "time" create_hypertable ------------------- diff --git a/test/expected/index.out b/test/expected/index.out index d1e7cf557..4f4deef05 100644 --- a/test/expected/index.out +++ b/test/expected/index.out @@ -1,6 +1,6 @@ CREATE TABLE index_test(time timestamptz, temp float); SELECT create_hypertable('index_test', 'time'); -NOTICE: adding NOT NULL constraint to column "time" +NOTICE: adding not-null constraint to column "time" create_hypertable ------------------- @@ -21,12 +21,12 @@ CREATE UNIQUE INDEX index_test_time_idx ON index_test (time); -- Creating a hypertable from a table with an index that doesn't cover -- all partitioning columns should fail SELECT create_hypertable('index_test', 'time', 'device', 2); -NOTICE: adding NOT NULL constraint to column "time" +NOTICE: adding not-null constraint to column "time" ERROR: cannot create a unique index without the column "device" (used in partitioning) \set ON_ERROR_STOP 1 -- Partitioning on only time should work SELECT create_hypertable('index_test', 'time'); -NOTICE: adding NOT NULL constraint to column "time" +NOTICE: adding not-null constraint to column "time" create_hypertable ------------------- @@ -107,7 +107,7 @@ SELECT * FROM test.show_columns('index_test'); -- No pre-existing UNIQUE index, so partitioning on two columns should work SELECT create_hypertable('index_test', 'time', 'device', 2); -NOTICE: adding NOT NULL constraint to column "time" +NOTICE: adding not-null constraint to column "time" create_hypertable ------------------- @@ -255,7 +255,7 @@ DROP INDEX a_hypertable_index_with_a_very_very_long_name_that_truncates_2; \set ON_ERROR_STOP 0 -- Create index CONCURRENTLY CREATE UNIQUE INDEX CONCURRENTLY index_test_time_device_idx ON index_test (time, device); -ERROR: Hypertables currently do not support concurrent index creation. +ERROR: hypertables do not support concurrent index creation \set ON_ERROR_STOP 1 -- Test tablespaces. Chunk indexes should end up in same tablespace as -- main index. @@ -369,7 +369,7 @@ SELECT * FROM _timescaledb_catalog.chunk_index; CREATE TABLE index_test(time timestamptz, temp float, device int) TABLESPACE tablespace1; -- Default indexes should be in the table's tablespace SELECT create_hypertable('index_test', 'time'); -NOTICE: adding NOT NULL constraint to column "time" +NOTICE: adding not-null constraint to column "time" create_hypertable ------------------- diff --git a/test/expected/insert.out b/test/expected/insert.out index 4f6c1f6d7..64e7d4edd 100644 --- a/test/expected/insert.out +++ b/test/expected/insert.out @@ -184,7 +184,7 @@ SELECT * FROM ONLY "two_Partitions"; CREATE TABLE error_test(time timestamp, temp float8, device text NOT NULL); SELECT create_hypertable('error_test', 'time', 'device', 2); -NOTICE: adding NOT NULL constraint to column "time" +NOTICE: adding not-null constraint to column "time" create_hypertable ------------------- @@ -235,7 +235,7 @@ SELECT * FROM tick_character; CREATE TABLE many_partitions_test(time timestamp, temp float8, device text NOT NULL); SELECT create_hypertable('many_partitions_test', 'time', 'device', 1000); -NOTICE: adding NOT NULL constraint to column "time" +NOTICE: adding not-null constraint to column "time" create_hypertable ------------------- @@ -263,7 +263,7 @@ SELECT count(*) FROM many_partitions_test; CREATE TABLE date_col_test(time date, temp float8, device text NOT NULL); SELECT create_hypertable('date_col_test', 'time', 'device', 1000, chunk_time_interval => INTERVAL '1 Day'); -NOTICE: adding NOT NULL constraint to column "time" +NOTICE: adding not-null constraint to column "time" create_hypertable ------------------- @@ -281,7 +281,7 @@ SELECT * FROM date_col_test WHERE time > '2001-01-01'; CREATE TABLE many_partitions_test_1m (time timestamp, temp float8, device text NOT NULL); SELECT create_hypertable('many_partitions_test_1m', 'time', 'device', 1000); -NOTICE: adding NOT NULL constraint to column "time" +NOTICE: adding not-null constraint to column "time" create_hypertable ------------------- @@ -685,7 +685,7 @@ SELECT * FROM many_partitions_test_1m ORDER BY time, device LIMIT 10; CREATE TABLE one_space_test(time timestamp, temp float8, device text NOT NULL); SELECT create_hypertable('one_space_test', 'time', 'device', 1); -NOTICE: adding NOT NULL constraint to column "time" +NOTICE: adding not-null constraint to column "time" create_hypertable ------------------- diff --git a/test/expected/insert_single.out b/test/expected/insert_single.out index 978c31d5a..0c914ddff 100644 --- a/test/expected/insert_single.out +++ b/test/expected/insert_single.out @@ -201,7 +201,7 @@ SELECT create_hypertable('"1dim_usec_interval"', 'time', chunk_time_interval=> 1 INSERT INTO "1dim_usec_interval" VALUES('1969-12-01T19:00:00', 21.2); CREATE TABLE "1dim_neg"(time INTEGER, temp float); SELECT create_hypertable('"1dim_neg"', 'time', chunk_time_interval=>10); -NOTICE: adding NOT NULL constraint to column "time" +NOTICE: adding not-null constraint to column "time" create_hypertable ------------------- @@ -276,7 +276,7 @@ SELECT * FROM _timescaledb_catalog.dimension_slice; -- Create a three-dimensional table CREATE TABLE "3dim" (time timestamp, temp float, device text, location text); SELECT create_hypertable('"3dim"', 'time', 'device', 2); -NOTICE: adding NOT NULL constraint to column "time" +NOTICE: adding not-null constraint to column "time" create_hypertable ------------------- @@ -407,7 +407,7 @@ SELECT create_hypertable('"smallinttime_err"', 'time', chunk_time_interval=>3276 --make sure date inserts work even when the timezone changes the CREATE TABLE hyper_date(time date, temp float); SELECT create_hypertable('"hyper_date"', 'time'); -NOTICE: adding NOT NULL constraint to column "time" +NOTICE: adding not-null constraint to column "time" create_hypertable ------------------- diff --git a/test/expected/partitioning-10.out b/test/expected/partitioning-10.out index 5a5ca7d72..826ac8d09 100644 --- a/test/expected/partitioning-10.out +++ b/test/expected/partitioning-10.out @@ -9,14 +9,14 @@ ERROR: table "partitioned_ht_create" is already partitioned CREATE TABLE partitioned_attachment_vanilla(time timestamptz, temp float, device int) PARTITION BY RANGE (time); CREATE TABLE attachment_hypertable(time timestamptz, temp float, device int); SELECT create_hypertable('attachment_hypertable', 'time'); -NOTICE: adding NOT NULL constraint to column "time" +NOTICE: adding not-null constraint to column "time" create_hypertable ------------------- (1 row) ALTER TABLE partitioned_attachment_vanilla ATTACH PARTITION attachment_hypertable FOR VALUES FROM ('2016-07-01') TO ('2016-08-01'); -ERROR: Hypertables do not support native postgres partitioning +ERROR: hypertables do not support native postgres partitioning \set ON_ERROR_STOP 1 -- Should not expect an error when attaching a normal table to a partition CREATE TABLE partitioned_vanilla(time timestamptz, temp float, device int) PARTITION BY RANGE (time); diff --git a/test/expected/partitioning-9.6.out b/test/expected/partitioning-9.6.out index f5bf6016d..4e50b63e9 100644 --- a/test/expected/partitioning-9.6.out +++ b/test/expected/partitioning-9.6.out @@ -11,7 +11,7 @@ CREATE TABLE partitioned_attachment_vanilla(time timestamptz, temp float, device ERROR: syntax error at or near "PARTITION" at character 87 CREATE TABLE attachment_hypertable(time timestamptz, temp float, device int); SELECT create_hypertable('attachment_hypertable', 'time'); -NOTICE: adding NOT NULL constraint to column "time" +NOTICE: adding not-null constraint to column "time" create_hypertable ------------------- diff --git a/test/expected/partitioning.out b/test/expected/partitioning.out index dec2b8cfa..9f2af42d5 100644 --- a/test/expected/partitioning.out +++ b/test/expected/partitioning.out @@ -1,6 +1,6 @@ CREATE TABLE part_legacy(time timestamptz, temp float, device int); SELECT create_hypertable('part_legacy', 'time', 'device', 2, partitioning_func => '_timescaledb_internal.get_partition_for_key'); -NOTICE: adding NOT NULL constraint to column "time" +NOTICE: adding not-null constraint to column "time" create_hypertable ------------------- @@ -43,7 +43,7 @@ SELECT * FROM part_legacy WHERE device = 1; CREATE TABLE part_new(time timestamptz, temp float, device int); SELECT create_hypertable('part_new', 'time', 'device', 2); -NOTICE: adding NOT NULL constraint to column "time" +NOTICE: adding not-null constraint to column "time" create_hypertable ------------------- @@ -87,7 +87,7 @@ SELECT * FROM part_new WHERE device = 1; CREATE TABLE part_new_convert1(time timestamptz, temp float8, device int); SELECT create_hypertable('part_new_convert1', 'time', 'temp', 2); -NOTICE: adding NOT NULL constraint to column "time" +NOTICE: adding not-null constraint to column "time" create_hypertable ------------------- @@ -97,7 +97,7 @@ INSERT INTO part_new_convert1 VALUES ('2017-03-22T09:18:23', 1.0, 2); \set ON_ERROR_STOP 0 -- Changing the type of a hash-partitioned column should not be supported ALTER TABLE part_new_convert1 ALTER COLUMN temp TYPE numeric; -ERROR: Cannot change the type of a hash-partitioned column +ERROR: cannot change the type of a hash-partitioned column \set ON_ERROR_STOP 1 -- Should be able to change if not hash partitioned though ALTER TABLE part_new_convert1 ALTER COLUMN time TYPE timestamp; @@ -111,7 +111,7 @@ SELECT * FROM test.show_columnsp('_timescaledb_internal._hyper_3_%_chunk'); CREATE TABLE part_add_dim(time timestamptz, temp float8, device int, location int); SELECT create_hypertable('part_add_dim', 'time', 'temp', 2); -NOTICE: adding NOT NULL constraint to column "time" +NOTICE: adding not-null constraint to column "time" create_hypertable ------------------- @@ -157,7 +157,7 @@ END $BODY$; CREATE TABLE part_custom_func(time timestamptz, temp float8, device text); SELECT create_hypertable('part_custom_func', 'time', 'device', 2, partitioning_func => 'custom_partfunc'); -NOTICE: adding NOT NULL constraint to column "time" +NOTICE: adding not-null constraint to column "time" create_hypertable ------------------- diff --git a/test/expected/plan_expand_hypertable_optimized.out b/test/expected/plan_expand_hypertable_optimized.out index a600cf443..a59754f4d 100644 --- a/test/expected/plan_expand_hypertable_optimized.out +++ b/test/expected/plan_expand_hypertable_optimized.out @@ -7,7 +7,7 @@ ALTER TABLE hyper DROP COLUMN time_broken, ADD COLUMN time BIGINT; SELECT create_hypertable('hyper', 'time', chunk_time_interval => 10); -psql:include/plan_expand_hypertable_load.sql:8: NOTICE: adding NOT NULL constraint to column "time" +psql:include/plan_expand_hypertable_load.sql:8: NOTICE: adding not-null constraint to column "time" create_hypertable ------------------- @@ -22,7 +22,7 @@ ALTER TABLE hyper_w_space DROP COLUMN time_broken, ADD COLUMN time BIGINT; SELECT create_hypertable('hyper_w_space', 'time', 'device_id', 2, chunk_time_interval => 10); -psql:include/plan_expand_hypertable_load.sql:24: NOTICE: adding NOT NULL constraint to column "time" +psql:include/plan_expand_hypertable_load.sql:24: NOTICE: adding not-null constraint to column "time" create_hypertable ------------------- @@ -37,7 +37,7 @@ ALTER TABLE hyper_ts DROP COLUMN time_broken, ADD COLUMN time TIMESTAMPTZ; SELECT create_hypertable('hyper_ts', 'time', 'device_id', 2, chunk_time_interval => '10 seconds'::interval); -psql:include/plan_expand_hypertable_load.sql:39: NOTICE: adding NOT NULL constraint to column "time" +psql:include/plan_expand_hypertable_load.sql:39: NOTICE: adding not-null constraint to column "time" create_hypertable ------------------- diff --git a/test/expected/plan_hashagg_optimized-10.out b/test/expected/plan_hashagg_optimized-10.out index 6c58a5fb8..7bf7a6d18 100644 --- a/test/expected/plan_hashagg_optimized-10.out +++ b/test/expected/plan_hashagg_optimized-10.out @@ -5,7 +5,7 @@ CREATE TABLE metric (id SERIAL PRIMARY KEY, value INT); CREATE TABLE hyper(time TIMESTAMP, time_int BIGINT, time_broken DATE, metricid int REFERENCES metric(id), VALUE double precision); CREATE TABLE regular(time TIMESTAMP, time_int BIGINT, time_date DATE, metricid int REFERENCES metric(id), VALUE double precision); SELECT create_hypertable('hyper', 'time', chunk_time_interval => interval '20 day', create_default_indexes=>FALSE); -psql:include/plan_hashagg_load.sql:5: NOTICE: adding NOT NULL constraint to column "time" +psql:include/plan_hashagg_load.sql:5: NOTICE: adding not-null constraint to column "time" create_hypertable ------------------- diff --git a/test/expected/plan_hashagg_optimized-9.6.out b/test/expected/plan_hashagg_optimized-9.6.out index 09d7880bb..3d04e2cae 100644 --- a/test/expected/plan_hashagg_optimized-9.6.out +++ b/test/expected/plan_hashagg_optimized-9.6.out @@ -5,7 +5,7 @@ CREATE TABLE metric (id SERIAL PRIMARY KEY, value INT); CREATE TABLE hyper(time TIMESTAMP, time_int BIGINT, time_broken DATE, metricid int REFERENCES metric(id), VALUE double precision); CREATE TABLE regular(time TIMESTAMP, time_int BIGINT, time_date DATE, metricid int REFERENCES metric(id), VALUE double precision); SELECT create_hypertable('hyper', 'time', chunk_time_interval => interval '20 day', create_default_indexes=>FALSE); -psql:include/plan_hashagg_load.sql:5: NOTICE: adding NOT NULL constraint to column "time" +psql:include/plan_hashagg_load.sql:5: NOTICE: adding not-null constraint to column "time" create_hypertable ------------------- diff --git a/test/expected/reindex.out b/test/expected/reindex.out index 8f9423da3..29b3e9343 100644 --- a/test/expected/reindex.out +++ b/test/expected/reindex.out @@ -46,7 +46,7 @@ INFO: index "_hyper_1_5_chunk_reindex_test_time_unique_idx" was reindexed -- this one currently doesn't recurse to chunks and instead gives an -- error REINDEX (VERBOSE) INDEX reindex_test_time_unique_idx; -ERROR: Reindexing of a specific index on a hypertable is currently unsupported. +ERROR: reindexing of a specific index on a hypertable is unsupported \set ON_ERROR_STOP 1 -- show reindexing on a normal table CREATE TABLE reindex_norm(time timestamp, temp float); diff --git a/test/expected/relocate_extension.out b/test/expected/relocate_extension.out index ce874fcfa..07595f62a 100644 --- a/test/expected/relocate_extension.out +++ b/test/expected/relocate_extension.out @@ -9,21 +9,21 @@ CREATE TABLE test_ts(time timestamp, temp float8, device text); CREATE TABLE test_tz(time timestamptz, temp float8, device text); CREATE TABLE test_dt(time date, temp float8, device text); SELECT "testSchema0".create_hypertable('test_ts', 'time', 'device', 2); -NOTICE: adding NOT NULL constraint to column "time" +NOTICE: adding not-null constraint to column "time" create_hypertable ------------------- (1 row) SELECT "testSchema0".create_hypertable('test_tz', 'time', 'device', 2); -NOTICE: adding NOT NULL constraint to column "time" +NOTICE: adding not-null constraint to column "time" create_hypertable ------------------- (1 row) SELECT "testSchema0".create_hypertable('test_dt', 'time', 'device', 2); -NOTICE: adding NOT NULL constraint to column "time" +NOTICE: adding not-null constraint to column "time" create_hypertable ------------------- diff --git a/test/expected/reloptions.out b/test/expected/reloptions.out index 849f5c875..6d1c0efc3 100644 --- a/test/expected/reloptions.out +++ b/test/expected/reloptions.out @@ -1,7 +1,7 @@ CREATE TABLE reloptions_test(time integer, temp float8, color integer) WITH (fillfactor=75, oids=true, autovacuum_vacuum_threshold=100); SELECT create_hypertable('reloptions_test', 'time', chunk_time_interval => 3); -NOTICE: adding NOT NULL constraint to column "time" +NOTICE: adding not-null constraint to column "time" create_hypertable ------------------- diff --git a/test/expected/size_utils.out b/test/expected/size_utils.out index 64e67a88a..7000c0ef6 100644 --- a/test/expected/size_utils.out +++ b/test/expected/size_utils.out @@ -93,7 +93,7 @@ SELECT * FROM indexes_relation_size_pretty('"public"."two_Partitions"'); CREATE TABLE timestamp_partitioned(time TIMESTAMP, value TEXT); SELECT * FROM create_hypertable('timestamp_partitioned', 'time', 'value', 2); -NOTICE: adding NOT NULL constraint to column "time" +NOTICE: adding not-null constraint to column "time" create_hypertable ------------------- @@ -117,7 +117,7 @@ SELECT * FROM chunk_relation_size_pretty('timestamp_partitioned'); CREATE TABLE timestamp_partitioned_2(time TIMESTAMP, value CHAR(9)); SELECT * FROM create_hypertable('timestamp_partitioned_2', 'time', 'value', 2); -NOTICE: adding NOT NULL constraint to column "time" +NOTICE: adding not-null constraint to column "time" create_hypertable ------------------- @@ -141,7 +141,7 @@ SELECT * FROM chunk_relation_size_pretty('timestamp_partitioned_2'); CREATE TABLE approx_count(time TIMESTAMP, value int); SELECT * FROM create_hypertable('approx_count', 'time'); -NOTICE: adding NOT NULL constraint to column "time" +NOTICE: adding not-null constraint to column "time" create_hypertable ------------------- diff --git a/test/expected/sql_query.out b/test/expected/sql_query.out index 818a47950..16e116d83 100644 --- a/test/expected/sql_query.out +++ b/test/expected/sql_query.out @@ -109,7 +109,7 @@ EXPLAIN (verbose ON, costs off) SELECT * FROM PUBLIC."two_Partitions" WHERE 'dev --test integer partition key CREATE TABLE "int_part"(time timestamp, object_id int, temp float); SELECT create_hypertable('"int_part"', 'time', 'object_id', 2); -NOTICE: adding NOT NULL constraint to column "time" +NOTICE: adding not-null constraint to column "time" create_hypertable ------------------- diff --git a/test/expected/tablespace.out b/test/expected/tablespace.out index 47eb633a8..e4dc3eb08 100644 --- a/test/expected/tablespace.out +++ b/test/expected/tablespace.out @@ -10,7 +10,7 @@ CREATE TABLESPACE tablespace1 OWNER :ROLE_DEFAULT_PERM_USER LOCATION :TEST_TABLE --assigning a tablespace via the main table should work CREATE TABLE tspace_2dim(time timestamp, temp float, device text) TABLESPACE tablespace1; SELECT create_hypertable('tspace_2dim', 'time', 'device', 2); -NOTICE: adding NOT NULL constraint to column "time" +NOTICE: adding not-null constraint to column "time" create_hypertable ------------------- @@ -106,7 +106,7 @@ SELECT * FROM test.show_indexesp('_timescaledb_internal._hyper%_chunk'); SET ROLE :ROLE_DEFAULT_PERM_USER_2; CREATE TABLE tspace_1dim(time timestamp, temp float, device text); SELECT create_hypertable('tspace_1dim', 'time'); -NOTICE: adding NOT NULL constraint to column "time" +NOTICE: adding not-null constraint to column "time" create_hypertable ------------------- @@ -330,7 +330,7 @@ SELECT * FROM _timescaledb_catalog.tablespace; -- hypertable CREATE TABLE tspace_1dim(time timestamp, temp float, device text); SELECT create_hypertable('tspace_1dim', 'time'); -NOTICE: adding NOT NULL constraint to column "time" +NOTICE: adding not-null constraint to column "time" create_hypertable ------------------- diff --git a/test/expected/upsert.out b/test/expected/upsert.out index 3e7bd785e..fe26ad28e 100644 --- a/test/expected/upsert.out +++ b/test/expected/upsert.out @@ -29,7 +29,7 @@ SELECT * FROM upsert_test; \set ON_ERROR_STOP 0 INSERT INTO upsert_test VALUES ('2017-01-20T09:00:01', 12.3, 'yellow') ON CONFLICT ON CONSTRAINT upsert_test_pkey DO UPDATE SET temp = 12.3 RETURNING time, temp, color; -ERROR: Hypertables do not support ON CONFLICT statements that reference constraints +ERROR: hypertables do not support ON CONFLICT statements that reference constraints -- Test that update generates error on conflicts INSERT INTO upsert_test VALUES ('2017-01-21T09:00:01', 22.5, 'yellow') RETURNING *; time | temp | color @@ -43,7 +43,7 @@ ERROR: duplicate key value violates unique constraint "1_1_upsert_test_pkey" -- Test with UNIQUE index on multiple columns instead of PRIMARY KEY constraint CREATE TABLE upsert_test_unique(time timestamp, temp float, color text); SELECT create_hypertable('upsert_test_unique', 'time'); -NOTICE: adding NOT NULL constraint to column "time" +NOTICE: adding not-null constraint to column "time" create_hypertable ------------------- @@ -77,7 +77,7 @@ SELECT * FROM upsert_test_unique ORDER BY time, color DESC; -- Test with multiple UNIQUE indexes CREATE TABLE upsert_test_multi_unique(time timestamp, temp float, color text); SELECT create_hypertable('upsert_test_multi_unique', 'time'); -NOTICE: adding NOT NULL constraint to column "time" +NOTICE: adding not-null constraint to column "time" create_hypertable ------------------- @@ -130,7 +130,7 @@ ALTER TABLE upsert_test_space DROP to_drop; ALTER TABLE upsert_test_space DROP device_id_1, ADD device_id char(20); CREATE UNIQUE INDEX time_space_idx ON upsert_test_space (time, device_id); SELECT create_hypertable('upsert_test_space', 'time', 'device_id', 2, partitioning_func=>'_timescaledb_internal.get_partition_for_key'::regproc); -NOTICE: adding NOT NULL constraint to column "time" +NOTICE: adding not-null constraint to column "time" create_hypertable ------------------- diff --git a/test/expected/vacuum.out b/test/expected/vacuum.out index 0dc8cfaf8..248bf26c2 100644 --- a/test/expected/vacuum.out +++ b/test/expected/vacuum.out @@ -1,7 +1,7 @@ CREATE TABLE vacuum_test(time timestamp, temp float); -- create hypertable with three chunks SELECT create_hypertable('vacuum_test', 'time', chunk_time_interval => 2628000000000); -NOTICE: adding NOT NULL constraint to column "time" +NOTICE: adding not-null constraint to column "time" create_hypertable ------------------- diff --git a/test/loader-mock/src/init.c b/test/loader-mock/src/init.c index 639a8270b..9b8eb266f 100644 --- a/test/loader-mock/src/init.c +++ b/test/loader-mock/src/init.c @@ -41,7 +41,7 @@ post_analyze_hook(ParseState *pstate, Query *query) if (extension_is_loaded()) elog(WARNING, "mock post_analyze_hook " STR(TIMESCALEDB_VERSION_MOD)); if (prev_post_parse_analyze_hook != NULL && !IsParallelWorker()) - elog(ERROR, "The extension called with a loader should always have a NULL prev hook"); + elog(ERROR, "the extension called with a loader should always have a NULL prev hook"); if (BROKEN && !creating_extension) elog(ERROR, "mock broken " STR(TIMESCALEDB_VERSION_MOD)); } @@ -57,7 +57,7 @@ _PG_init(void) elog(WARNING, "mock init " STR(TIMESCALEDB_VERSION_MOD)); prev_post_parse_analyze_hook = post_parse_analyze_hook; if (prev_post_parse_analyze_hook != NULL && !IsParallelWorker()) - elog(ERROR, "The extension loaded with a loader should always have a NULL prev hook"); + elog(ERROR, "the extension loaded with a loader should always have a NULL prev hook"); post_parse_analyze_hook = post_analyze_hook; CacheRegisterRelcacheCallback(cache_invalidate_callback, PointerGetDatum(NULL)); }