Documentation
¶
Overview ¶
Package postgres provides the PostgreSQL storage adapter for Auth-All.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewPool ¶ added in v0.3.0
NewPool returns a PostgreSQL store over an application-owned pgx pool.
The store is safe behind a transaction pooler. It makes no named prepared statement, takes no advisory lock, and creates no temporary table. The pool must therefore use an exec mode that caches no statement. NewPool refuses another mode, because the failure would otherwise appear later as a random "prepared statement does not exist" error.
Types ¶
type Option ¶ added in v0.3.0
type Option func(*poolConfig)
Option configures the pool store.
func AllowStatementCache ¶ added in v0.3.0
func AllowStatementCache() Option
AllowStatementCache accepts a pool whose exec mode caches a prepared statement. Use it only when no transaction pooler stands between the application and PostgreSQL.