diff --git a/db/routines/R__063_fn_load_planning_slots_full.sql b/db/routines/R__063_fn_load_planning_slots_full.sql index a142281..7777559 100644 --- a/db/routines/R__063_fn_load_planning_slots_full.sql +++ b/db/routines/R__063_fn_load_planning_slots_full.sql @@ -53,7 +53,7 @@ begin ) as gs ) select - row_number() over (order by s.interval_start) - 1 as slot_ord, + (row_number() over (order by s.interval_start) - 1)::int as slot_ord, s.interval_start, coalesce( ep.effective_buy_price_czk_kwh,