Skip to content

Commit

Permalink
Add julian day func test and fix assumption in show_partitions()
Browse files Browse the repository at this point in the history
  • Loading branch information
calebj committed Jan 8, 2025
1 parent c2f44bf commit e44919b
Show file tree
Hide file tree
Showing 2 changed files with 326 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sql/functions/show_partitions.sql
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,9 @@ ELSIF v_control_type IN ('text', 'uuid') THEN
ELSIF v_control_type = 'id' AND v_epoch = 'func' THEN
-- Trim like below since there is no guarantee as to what type of ID it is
v_sql := v_sql || format('
ORDER BY %s(trim( BOTH $QUOTE$''$QUOTE$ from (regexp_match(pg_get_expr(c.relpartbound, c.oid, true), $REGEX$\(([^)]+)\) TO \(([^)]+)\)$REGEX$))[1]::text )::bigint ) %s '
ORDER BY %s(trim( BOTH $QUOTE$''$QUOTE$ from (regexp_match(pg_get_expr(c.relpartbound, c.oid, true), $REGEX$\(([^)]+)\) TO \(([^)]+)\)$REGEX$))[1]::text )::%s ) %s '
, v_time_decoder
, v_exact_control_type
, p_order);

ELSIF v_control_type = 'id' AND v_epoch <> 'none' THEN
Expand Down
Loading

0 comments on commit e44919b

Please sign in to comment.