Skip to content
arohner edited this page Sep 27, 2011 · 10 revisions

Usage

This page describes how to use the features of the Postgres crate. Not all features are currently covered

Settings

The postgres crate stores configuration in a settings map, that looks like

(postgres/settings (postgres/settings-map {:version "8.4"}))

Permissions

Permissions specify the contents of the pg_hba file. Familiarity with the pg_hba.conf file format is assumed here. For more information, see http://www.postgresql.org/docs/9.0/interactive/auth-pg-hba-conf.html

Permissions is a seq of records, each record is a map, that looks like

clojure
{:connection-type "local" :database "all" :user "all" :auth-method "trust"}

The required keys are :connection-type, :database, :user, :auth-method. :ip-mask and :auth-options are optional keys.

A record can also be a vector

clojure
["local" "all "all" "trust"]

The argument types are inferred.

Clone this wiki locally