seancorfield / next-jdbc

A modern low-level Clojure wrapper for JDBC-based access to databases.
https://cljdoc.org/d/com.github.seancorfield/next.jdbc/
Eclipse Public License 1.0
768 stars 90 forks source link

Storing values of the clojure.lang.Keyword type #114

Closed darkleaf closed 4 years ago

darkleaf commented 4 years ago

How can I store and fetch a keyword in Postgres?

Domain types are not working. JDBC treats them as strings. Composite types are too complex.

seancorfield commented 4 years ago

You'd have to translate keywords to something that PostgreSQL can store (and translate them back on fetch). GitHub issues are not a good way to have a discussion about something open-ended like this (I do not use PostgreSQL so I know very little about its custom types). I'd recommend you join the #sql channel on the Clojurians Slack and ask how other PostgreSQL users handle this.

Sign up for Slack here: http://clojurians.net -- Messages etc here: https://clojurians.slack.com