Skip to content

Commit b7d2772

Browse files
committed
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
1 parent 25e8e0f commit b7d2772

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/puppetlabs/puppetdb/scf/partitioning.clj

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
(ns puppetlabs.puppetdb.scf.partitioning
22
"Handles all work related to database table partitioning"
33
(:require
4+
[clojure.string :refer [lower-case]]
45
[puppetlabs.i18n.core :refer [trs]]
56
[puppetlabs.puppetdb.jdbc :as jdbc]
67
[schema.core :as s])
@@ -32,8 +33,8 @@
3233

3334
(defn date-suffix
3435
[date]
35-
(let [formatter (.withZone (DateTimeFormatter/BASIC_ISO_DATE) (ZoneId/of "UTC"))]
36-
(.format date formatter)))
36+
(let [formatter (.withZone DateTimeFormatter/BASIC_ISO_DATE (ZoneId/of "UTC"))]
37+
(lower-case (.format date formatter))))
3738

3839
(defn to-zoned-date-time
3940
[date]

0 commit comments

Comments
 (0)