This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-08-23
Channels
- # babashka (4)
- # beginners (46)
- # biff (64)
- # calva (34)
- # cider (29)
- # cljdoc (12)
- # cljs-dev (16)
- # clojure (42)
- # clojure-australia (2)
- # clojure-china (1)
- # clojure-europe (35)
- # clojure-filipino (1)
- # clojure-hk (1)
- # clojure-indonesia (1)
- # clojure-japan (1)
- # clojure-korea (1)
- # clojure-my (1)
- # clojure-nl (1)
- # clojure-norway (6)
- # clojure-sg (1)
- # clojure-taiwan (1)
- # clojure-uk (4)
- # clojurescript (3)
- # core-typed (3)
- # cursive (5)
- # datalevin (3)
- # datomic (23)
- # hyperfiddle (92)
- # joyride (8)
- # juxt (3)
- # malli (1)
- # nbb (44)
- # pathom (10)
- # portal (3)
- # rdf (1)
- # reitit (10)
- # shadow-cljs (60)
- # sql (12)
I am probably missing something in the docs, but is there a way in HoneSQL to use a CREATE OR REPLACE VIEW ...
statement? Postgres does not like {:create-view [:view_name :if-not-exists] ...}
/ CREATE VIEW view_name IF NOT EXISTS ...
PG doesn't support that? Wow. Create a GH issue and I'll add something for that. Does PG support IF NOT EXISTS
for other CREATE
clauses?
Looks like recent PG versions have added support for this (9.5 onward maybe?).
Hmm, looks very inconsistent. Some CREATE
statements got added with IF NOT EXISTS
, some got OR REPLACE
, going back a few versions some have neither. What a mess (my opinion of PG in general).
No worries about creating an issue. Looks like only :create-view
needs this variant so I'm adding it now.
I can confirm {:create-table [:name :if-not-exists] ... }
does work as expected at least
Yeah, it seems like PG eventually added IF NOT EXISTS
support to almost everything except CREATE VIEW
(and CREATE FUNCTION
but HoneySQL can't really support that since it would inline arbitrary SQL).
There's a new 2.4.9999-SNAPSHOT
version if you want to try that, which includes :create-or-replace-view
for this.
Otherwise a full release will appear next week with a bunch of new stuff in it.