From b7d27729633dfdc8b34cafdba2d9ce284cbdb8e3 Mon Sep 17 00:00:00 2001 From: Austin Blatt Date: Wed, 16 Oct 2024 15:50:06 -0700 Subject: [PATCH] partitioning: make date-suffix return lower-case string postgres will coerce unquoted table names to lowercase, so have this function return lowercase from the start --- src/puppetlabs/puppetdb/scf/partitioning.clj | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/puppetlabs/puppetdb/scf/partitioning.clj b/src/puppetlabs/puppetdb/scf/partitioning.clj index e3f356596e..afa6f41e70 100644 --- a/src/puppetlabs/puppetdb/scf/partitioning.clj +++ b/src/puppetlabs/puppetdb/scf/partitioning.clj @@ -1,6 +1,7 @@ (ns puppetlabs.puppetdb.scf.partitioning "Handles all work related to database table partitioning" (:require + [clojure.string :refer [lower-case]] [puppetlabs.i18n.core :refer [trs]] [puppetlabs.puppetdb.jdbc :as jdbc] [schema.core :as s]) @@ -32,8 +33,8 @@ (defn date-suffix [date] - (let [formatter (.withZone (DateTimeFormatter/BASIC_ISO_DATE) (ZoneId/of "UTC"))] - (.format date formatter))) + (let [formatter (.withZone DateTimeFormatter/BASIC_ISO_DATE (ZoneId/of "UTC"))] + (lower-case (.format date formatter)))) (defn to-zoned-date-time [date]