File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -433,14 +433,18 @@ ts_calculate_chunk_interval(PG_FUNCTION_ARGS)
433
433
elog (ERROR , "invalid number of arguments" );
434
434
435
435
if (chunk_target_size_bytes < 0 )
436
- elog (ERROR , "chunk_target_size must be positive" );
436
+ ereport (ERROR ,
437
+ (errcode (ERRCODE_INVALID_PARAMETER_VALUE ),
438
+ errmsg ("chunk_target_size must be positive" )));
437
439
438
440
elog (DEBUG1 , "[adaptive] chunk_target_size_bytes=" UINT64_FORMAT , chunk_target_size_bytes );
439
441
440
442
hypertable_id = ts_dimension_get_hypertable_id (dimension_id );
441
443
442
444
if (hypertable_id <= 0 )
443
- elog (ERROR , "could not find a matching hypertable for dimension %u" , dimension_id );
445
+ ereport (ERROR ,
446
+ (errcode (ERRCODE_NO_DATA_FOUND ),
447
+ errmsg ("could not find a matching hypertable for dimension %u" , dimension_id )));
444
448
445
449
ht = ts_hypertable_get_by_id (hypertable_id );
446
450
Original file line number Diff line number Diff line change @@ -1006,9 +1006,10 @@ validate_hypertable_for_compression(Hypertable *ht)
1006
1006
if (strncmp (NameStr (attr -> attname ),
1007
1007
COMPRESSION_COLUMN_METADATA_PREFIX ,
1008
1008
strlen (COMPRESSION_COLUMN_METADATA_PREFIX )) == 0 )
1009
- elog (ERROR ,
1010
- "cannot convert tables with reserved column prefix '%s' to columnstore" ,
1011
- COMPRESSION_COLUMN_METADATA_PREFIX );
1009
+ ereport (ERROR ,
1010
+ (errcode (ERRCODE_RESERVED_NAME ),
1011
+ errmsg ("cannot convert tables with reserved column prefix '%s' to columnstore" ,
1012
+ COMPRESSION_COLUMN_METADATA_PREFIX )));
1012
1013
}
1013
1014
1014
1015
if (row_size > MaxHeapTupleSize )
You can’t perform that action at this time.
0 commit comments