/usr/share/doc/libghc-persistent-postgresql-doc/html/Database-Persist-Postgresql.html is in libghc-persistent-postgresql-doc 2.6.2.1-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Database.Persist.Postgresql</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script src="file:///usr/share/javascript/mathjax/MathJax.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Database-Persist-Postgresql.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Database-Persist-Postgresql.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">persistent-postgresql-2.6.2.1: Backend for the persistent library using postgresql.</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Safe Haskell</th><td>None</td></tr><tr><th>Language</th><td>Haskell98</td></tr></table><p class="caption">Database.Persist.Postgresql</p></div><div id="description"><p class="caption">Description</p><div class="doc"><p>A postgresql backend for persistent.</p></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><a href="#v:withPostgresqlPool">withPostgresqlPool</a> :: (<a href="file:///usr/share/doc/libghc-monad-control-doc/html/Control-Monad-Trans-Control.html#t:MonadBaseControl">MonadBaseControl</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> m, <a href="file:///usr/share/doc/libghc-monad-logger-doc/html/Control-Monad-Logger.html#t:MonadLogger">MonadLogger</a> m, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m, <a href="file:///usr/share/doc/libghc-persistent-doc/html/Database-Persist-Sql-Types-Internal.html#t:IsSqlBackend">IsSqlBackend</a> backend) => <a href="Database-Persist-Postgresql.html#t:ConnectionString">ConnectionString</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -> (<a href="file:///usr/share/doc/libghc-resource-pool-doc/html/Data-Pool.html#t:Pool">Pool</a> backend -> m a) -> m a</li><li class="src short"><a href="#v:withPostgresqlPoolWithVersion">withPostgresqlPoolWithVersion</a> :: (<a href="file:///usr/share/doc/libghc-monad-control-doc/html/Control-Monad-Trans-Control.html#t:MonadBaseControl">MonadBaseControl</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> m, <a href="file:///usr/share/doc/libghc-monad-logger-doc/html/Control-Monad-Logger.html#t:MonadLogger">MonadLogger</a> m, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m, <a href="file:///usr/share/doc/libghc-persistent-doc/html/Database-Persist-Sql-Types-Internal.html#t:IsSqlBackend">IsSqlBackend</a> backend) => (<a href="file:///usr/share/doc/libghc-postgresql-simple-doc/html/Database-PostgreSQL-Simple-Internal.html#t:Connection">Connection</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Double">Double</a>)) -> <a href="Database-Persist-Postgresql.html#t:ConnectionString">ConnectionString</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -> (<a href="file:///usr/share/doc/libghc-resource-pool-doc/html/Data-Pool.html#t:Pool">Pool</a> backend -> m a) -> m a</li><li class="src short"><a href="#v:withPostgresqlConn">withPostgresqlConn</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m, <a href="file:///usr/share/doc/libghc-monad-control-doc/html/Control-Monad-Trans-Control.html#t:MonadBaseControl">MonadBaseControl</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> m, <a href="file:///usr/share/doc/libghc-monad-logger-doc/html/Control-Monad-Logger.html#t:MonadLogger">MonadLogger</a> m, <a href="file:///usr/share/doc/libghc-persistent-doc/html/Database-Persist-Sql-Types-Internal.html#t:IsSqlBackend">IsSqlBackend</a> backend) => <a href="Database-Persist-Postgresql.html#t:ConnectionString">ConnectionString</a> -> (backend -> m a) -> m a</li><li class="src short"><a href="#v:withPostgresqlConnWithVersion">withPostgresqlConnWithVersion</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m, <a href="file:///usr/share/doc/libghc-monad-control-doc/html/Control-Monad-Trans-Control.html#t:MonadBaseControl">MonadBaseControl</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> m, <a href="file:///usr/share/doc/libghc-monad-logger-doc/html/Control-Monad-Logger.html#t:MonadLogger">MonadLogger</a> m, <a href="file:///usr/share/doc/libghc-persistent-doc/html/Database-Persist-Sql-Types-Internal.html#t:IsSqlBackend">IsSqlBackend</a> backend) => (<a href="file:///usr/share/doc/libghc-postgresql-simple-doc/html/Database-PostgreSQL-Simple-Internal.html#t:Connection">Connection</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Double">Double</a>)) -> <a href="Database-Persist-Postgresql.html#t:ConnectionString">ConnectionString</a> -> (backend -> m a) -> m a</li><li class="src short"><a href="#v:createPostgresqlPool">createPostgresqlPool</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m, <a href="file:///usr/share/doc/libghc-monad-control-doc/html/Control-Monad-Trans-Control.html#t:MonadBaseControl">MonadBaseControl</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> m, <a href="file:///usr/share/doc/libghc-monad-logger-doc/html/Control-Monad-Logger.html#t:MonadLogger">MonadLogger</a> m, <a href="file:///usr/share/doc/libghc-persistent-doc/html/Database-Persist-Sql-Types-Internal.html#t:IsSqlBackend">IsSqlBackend</a> backend) => <a href="Database-Persist-Postgresql.html#t:ConnectionString">ConnectionString</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -> m (<a href="file:///usr/share/doc/libghc-resource-pool-doc/html/Data-Pool.html#t:Pool">Pool</a> backend)</li><li class="src short"><a href="#v:createPostgresqlPoolModified">createPostgresqlPoolModified</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m, <a href="file:///usr/share/doc/libghc-monad-control-doc/html/Control-Monad-Trans-Control.html#t:MonadBaseControl">MonadBaseControl</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> m, <a href="file:///usr/share/doc/libghc-monad-logger-doc/html/Control-Monad-Logger.html#t:MonadLogger">MonadLogger</a> m, <a href="file:///usr/share/doc/libghc-persistent-doc/html/Database-Persist-Sql-Types-Internal.html#t:IsSqlBackend">IsSqlBackend</a> backend) => (<a href="file:///usr/share/doc/libghc-postgresql-simple-doc/html/Database-PostgreSQL-Simple-Internal.html#t:Connection">Connection</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> ()) -> <a href="Database-Persist-Postgresql.html#t:ConnectionString">ConnectionString</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -> m (<a href="file:///usr/share/doc/libghc-resource-pool-doc/html/Data-Pool.html#t:Pool">Pool</a> backend)</li><li class="src short"><a href="#v:createPostgresqlPoolModifiedWithVersion">createPostgresqlPoolModifiedWithVersion</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m, <a href="file:///usr/share/doc/libghc-monad-control-doc/html/Control-Monad-Trans-Control.html#t:MonadBaseControl">MonadBaseControl</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> m, <a href="file:///usr/share/doc/libghc-monad-logger-doc/html/Control-Monad-Logger.html#t:MonadLogger">MonadLogger</a> m, <a href="file:///usr/share/doc/libghc-persistent-doc/html/Database-Persist-Sql-Types-Internal.html#t:IsSqlBackend">IsSqlBackend</a> backend) => (<a href="file:///usr/share/doc/libghc-postgresql-simple-doc/html/Database-PostgreSQL-Simple-Internal.html#t:Connection">Connection</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Double">Double</a>)) -> (<a href="file:///usr/share/doc/libghc-postgresql-simple-doc/html/Database-PostgreSQL-Simple-Internal.html#t:Connection">Connection</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> ()) -> <a href="Database-Persist-Postgresql.html#t:ConnectionString">ConnectionString</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -> m (<a href="file:///usr/share/doc/libghc-resource-pool-doc/html/Data-Pool.html#t:Pool">Pool</a> backend)</li><li class="src short">module <a href="file:///usr/share/doc/libghc-persistent-doc/html/Database-Persist-Sql.html">Database.Persist.Sql</a></li><li class="src short"><span class="keyword">type</span> <a href="#t:ConnectionString">ConnectionString</a> = <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:PostgresConf">PostgresConf</a> = <a href="#v:PostgresConf">PostgresConf</a> {<ul class="subs"><li><a href="#v:pgConnStr">pgConnStr</a> :: <a href="Database-Persist-Postgresql.html#t:ConnectionString">ConnectionString</a></li><li><a href="#v:pgPoolSize">pgPoolSize</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a></li></ul>}</li><li class="src short"><a href="#v:openSimpleConn">openSimpleConn</a> :: <a href="file:///usr/share/doc/libghc-persistent-doc/html/Database-Persist-Sql-Types-Internal.html#t:IsSqlBackend">IsSqlBackend</a> backend => <a href="file:///usr/share/doc/libghc-persistent-doc/html/Database-Persist-Sql-Types-Internal.html#t:LogFunc">LogFunc</a> -> <a href="file:///usr/share/doc/libghc-postgresql-simple-doc/html/Database-PostgreSQL-Simple-Internal.html#t:Connection">Connection</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> backend</li><li class="src short"><a href="#v:tableName">tableName</a> :: <a href="file:///usr/share/doc/libghc-persistent-doc/html/Database-Persist-Class.html#t:PersistEntity">PersistEntity</a> record => record -> <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a></li><li class="src short"><a href="#v:fieldName">fieldName</a> :: <a href="file:///usr/share/doc/libghc-persistent-doc/html/Database-Persist-Class.html#t:PersistEntity">PersistEntity</a> record => <a href="file:///usr/share/doc/libghc-persistent-doc/html/Database-Persist-Class.html#t:EntityField">EntityField</a> record typ -> <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a></li><li class="src short"><a href="#v:mockMigration">mockMigration</a> :: <a href="file:///usr/share/doc/libghc-persistent-doc/html/Database-Persist-Sql.html#t:Migration">Migration</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> ()</li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><a id="v:withPostgresqlPool" class="def">withPostgresqlPool</a> <a href="src/Database-Persist-Postgresql.html#withPostgresqlPool" class="link">Source</a> <a href="#v:withPostgresqlPool" class="selflink">#</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: (<a href="file:///usr/share/doc/libghc-monad-control-doc/html/Control-Monad-Trans-Control.html#t:MonadBaseControl">MonadBaseControl</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> m, <a href="file:///usr/share/doc/libghc-monad-logger-doc/html/Control-Monad-Logger.html#t:MonadLogger">MonadLogger</a> m, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m, <a href="file:///usr/share/doc/libghc-persistent-doc/html/Database-Persist-Sql-Types-Internal.html#t:IsSqlBackend">IsSqlBackend</a> backend)</td><td class="doc empty"> </td></tr><tr><td class="src">=> <a href="Database-Persist-Postgresql.html#t:ConnectionString">ConnectionString</a></td><td class="doc"><p>Connection string to the database.</p></td></tr><tr><td class="src">-> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a></td><td class="doc"><p>Number of connections to be kept open in
the pool.</p></td></tr><tr><td class="src">-> (<a href="file:///usr/share/doc/libghc-resource-pool-doc/html/Data-Pool.html#t:Pool">Pool</a> backend -> m a)</td><td class="doc"><p>Action to be executed that uses the
connection pool.</p></td></tr><tr><td class="src">-> m a</td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>Create a PostgreSQL connection pool and run the given
action. The pool is properly released after the action
finishes using it. Note that you should not use the given
<code><a href="file:///usr/share/doc/libghc-persistent-doc/html/Database-Persist-Sql.html#t:ConnectionPool">ConnectionPool</a></code> outside the action since it may be already
been released.</p></div></div><div class="top"><p class="src"><a id="v:withPostgresqlPoolWithVersion" class="def">withPostgresqlPoolWithVersion</a> <a href="src/Database-Persist-Postgresql.html#withPostgresqlPoolWithVersion" class="link">Source</a> <a href="#v:withPostgresqlPoolWithVersion" class="selflink">#</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: (<a href="file:///usr/share/doc/libghc-monad-control-doc/html/Control-Monad-Trans-Control.html#t:MonadBaseControl">MonadBaseControl</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> m, <a href="file:///usr/share/doc/libghc-monad-logger-doc/html/Control-Monad-Logger.html#t:MonadLogger">MonadLogger</a> m, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m, <a href="file:///usr/share/doc/libghc-persistent-doc/html/Database-Persist-Sql-Types-Internal.html#t:IsSqlBackend">IsSqlBackend</a> backend)</td><td class="doc empty"> </td></tr><tr><td class="src">=> (<a href="file:///usr/share/doc/libghc-postgresql-simple-doc/html/Database-PostgreSQL-Simple-Internal.html#t:Connection">Connection</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Double">Double</a>))</td><td class="doc"><p>action to perform to get the server version</p></td></tr><tr><td class="src">-> <a href="Database-Persist-Postgresql.html#t:ConnectionString">ConnectionString</a></td><td class="doc"><p>Connection string to the database.</p></td></tr><tr><td class="src">-> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a></td><td class="doc"><p>Number of connections to be kept open in
the pool.</p></td></tr><tr><td class="src">-> (<a href="file:///usr/share/doc/libghc-resource-pool-doc/html/Data-Pool.html#t:Pool">Pool</a> backend -> m a)</td><td class="doc"><p>Action to be executed that uses the
connection pool.</p></td></tr><tr><td class="src">-> m a</td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>Same as <code>withPostgresPool</code>, but takes a callback for obtaining
the server version (to workaround an Amazon Redshift bug).</p><p><em>Since: 2.6.2</em></p></div></div><div class="top"><p class="src"><a id="v:withPostgresqlConn" class="def">withPostgresqlConn</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m, <a href="file:///usr/share/doc/libghc-monad-control-doc/html/Control-Monad-Trans-Control.html#t:MonadBaseControl">MonadBaseControl</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> m, <a href="file:///usr/share/doc/libghc-monad-logger-doc/html/Control-Monad-Logger.html#t:MonadLogger">MonadLogger</a> m, <a href="file:///usr/share/doc/libghc-persistent-doc/html/Database-Persist-Sql-Types-Internal.html#t:IsSqlBackend">IsSqlBackend</a> backend) => <a href="Database-Persist-Postgresql.html#t:ConnectionString">ConnectionString</a> -> (backend -> m a) -> m a <a href="src/Database-Persist-Postgresql.html#withPostgresqlConn" class="link">Source</a> <a href="#v:withPostgresqlConn" class="selflink">#</a></p><div class="doc"><p>Same as <code><a href="Database-Persist-Postgresql.html#v:withPostgresqlPool">withPostgresqlPool</a></code>, but instead of opening a pool
of connections, only one connection is opened.</p></div></div><div class="top"><p class="src"><a id="v:withPostgresqlConnWithVersion" class="def">withPostgresqlConnWithVersion</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m, <a href="file:///usr/share/doc/libghc-monad-control-doc/html/Control-Monad-Trans-Control.html#t:MonadBaseControl">MonadBaseControl</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> m, <a href="file:///usr/share/doc/libghc-monad-logger-doc/html/Control-Monad-Logger.html#t:MonadLogger">MonadLogger</a> m, <a href="file:///usr/share/doc/libghc-persistent-doc/html/Database-Persist-Sql-Types-Internal.html#t:IsSqlBackend">IsSqlBackend</a> backend) => (<a href="file:///usr/share/doc/libghc-postgresql-simple-doc/html/Database-PostgreSQL-Simple-Internal.html#t:Connection">Connection</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Double">Double</a>)) -> <a href="Database-Persist-Postgresql.html#t:ConnectionString">ConnectionString</a> -> (backend -> m a) -> m a <a href="src/Database-Persist-Postgresql.html#withPostgresqlConnWithVersion" class="link">Source</a> <a href="#v:withPostgresqlConnWithVersion" class="selflink">#</a></p><div class="doc"><p>Same as <code><a href="Database-Persist-Postgresql.html#v:withPostgresqlConn">withPostgresqlConn</a></code>, but takes a callback for obtaining
the server version (to workaround an Amazon Redshift bug).</p><p><em>Since: 2.6.2</em></p></div></div><div class="top"><p class="src"><a id="v:createPostgresqlPool" class="def">createPostgresqlPool</a> <a href="src/Database-Persist-Postgresql.html#createPostgresqlPool" class="link">Source</a> <a href="#v:createPostgresqlPool" class="selflink">#</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m, <a href="file:///usr/share/doc/libghc-monad-control-doc/html/Control-Monad-Trans-Control.html#t:MonadBaseControl">MonadBaseControl</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> m, <a href="file:///usr/share/doc/libghc-monad-logger-doc/html/Control-Monad-Logger.html#t:MonadLogger">MonadLogger</a> m, <a href="file:///usr/share/doc/libghc-persistent-doc/html/Database-Persist-Sql-Types-Internal.html#t:IsSqlBackend">IsSqlBackend</a> backend)</td><td class="doc empty"> </td></tr><tr><td class="src">=> <a href="Database-Persist-Postgresql.html#t:ConnectionString">ConnectionString</a></td><td class="doc"><p>Connection string to the database.</p></td></tr><tr><td class="src">-> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a></td><td class="doc"><p>Number of connections to be kept open
in the pool.</p></td></tr><tr><td class="src">-> m (<a href="file:///usr/share/doc/libghc-resource-pool-doc/html/Data-Pool.html#t:Pool">Pool</a> backend)</td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>Create a PostgreSQL connection pool. Note that it's your
responsibility to properly close the connection pool when
unneeded. Use <code><a href="Database-Persist-Postgresql.html#v:withPostgresqlPool">withPostgresqlPool</a></code> for an automatic resource
control.</p></div></div><div class="top"><p class="src"><a id="v:createPostgresqlPoolModified" class="def">createPostgresqlPoolModified</a> <a href="src/Database-Persist-Postgresql.html#createPostgresqlPoolModified" class="link">Source</a> <a href="#v:createPostgresqlPoolModified" class="selflink">#</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m, <a href="file:///usr/share/doc/libghc-monad-control-doc/html/Control-Monad-Trans-Control.html#t:MonadBaseControl">MonadBaseControl</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> m, <a href="file:///usr/share/doc/libghc-monad-logger-doc/html/Control-Monad-Logger.html#t:MonadLogger">MonadLogger</a> m, <a href="file:///usr/share/doc/libghc-persistent-doc/html/Database-Persist-Sql-Types-Internal.html#t:IsSqlBackend">IsSqlBackend</a> backend)</td><td class="doc empty"> </td></tr><tr><td class="src">=> (<a href="file:///usr/share/doc/libghc-postgresql-simple-doc/html/Database-PostgreSQL-Simple-Internal.html#t:Connection">Connection</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> ())</td><td class="doc"><p>action to perform after connection is created</p></td></tr><tr><td class="src">-> <a href="Database-Persist-Postgresql.html#t:ConnectionString">ConnectionString</a></td><td class="doc"><p>Connection string to the database.</p></td></tr><tr><td class="src">-> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a></td><td class="doc"><p>Number of connections to be kept open in the pool.</p></td></tr><tr><td class="src">-> m (<a href="file:///usr/share/doc/libghc-resource-pool-doc/html/Data-Pool.html#t:Pool">Pool</a> backend)</td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>Same as <code><a href="Database-Persist-Postgresql.html#v:createPostgresqlPool">createPostgresqlPool</a></code>, but additionally takes a callback function
for some connection-specific tweaking to be performed after connection
creation. This could be used, for example, to change the schema. For more
information, see:</p><p><a href="https://groups.google.com/d/msg/yesodweb/qUXrEN_swEo/O0pFwqwQIdcJ">https://groups.google.com/d/msg/yesodweb/qUXrEN_swEo/O0pFwqwQIdcJ</a></p><p><em>Since: 2.1.3</em></p></div></div><div class="top"><p class="src"><a id="v:createPostgresqlPoolModifiedWithVersion" class="def">createPostgresqlPoolModifiedWithVersion</a> <a href="src/Database-Persist-Postgresql.html#createPostgresqlPoolModifiedWithVersion" class="link">Source</a> <a href="#v:createPostgresqlPoolModifiedWithVersion" class="selflink">#</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m, <a href="file:///usr/share/doc/libghc-monad-control-doc/html/Control-Monad-Trans-Control.html#t:MonadBaseControl">MonadBaseControl</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> m, <a href="file:///usr/share/doc/libghc-monad-logger-doc/html/Control-Monad-Logger.html#t:MonadLogger">MonadLogger</a> m, <a href="file:///usr/share/doc/libghc-persistent-doc/html/Database-Persist-Sql-Types-Internal.html#t:IsSqlBackend">IsSqlBackend</a> backend)</td><td class="doc empty"> </td></tr><tr><td class="src">=> (<a href="file:///usr/share/doc/libghc-postgresql-simple-doc/html/Database-PostgreSQL-Simple-Internal.html#t:Connection">Connection</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Double">Double</a>))</td><td class="doc"><p>action to perform to get the server version</p></td></tr><tr><td class="src">-> (<a href="file:///usr/share/doc/libghc-postgresql-simple-doc/html/Database-PostgreSQL-Simple-Internal.html#t:Connection">Connection</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> ())</td><td class="doc"><p>action to perform after connection is created</p></td></tr><tr><td class="src">-> <a href="Database-Persist-Postgresql.html#t:ConnectionString">ConnectionString</a></td><td class="doc"><p>Connection string to the database.</p></td></tr><tr><td class="src">-> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a></td><td class="doc"><p>Number of connections to be kept open in the pool.</p></td></tr><tr><td class="src">-> m (<a href="file:///usr/share/doc/libghc-resource-pool-doc/html/Data-Pool.html#t:Pool">Pool</a> backend)</td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>Same as other similarly-named functions in this module, but takes callbacks for obtaining
the server version (to workaround an Amazon Redshift bug) and connection-specific tweaking
(to change the schema).</p><p><em>Since: 2.6.2</em></p></div></div><div class="top"><p class="src">module <a href="file:///usr/share/doc/libghc-persistent-doc/html/Database-Persist-Sql.html">Database.Persist.Sql</a></p></div><div class="top"><p class="src"><span class="keyword">type</span> <a id="t:ConnectionString" class="def">ConnectionString</a> = <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> <a href="src/Database-Persist-Postgresql.html#ConnectionString" class="link">Source</a> <a href="#t:ConnectionString" class="selflink">#</a></p><div class="doc"><p>A <code>libpq</code> connection string. A simple example of connection
string would be <code>"host=localhost port=5432 user=test
dbname=test password=test"</code>. Please read libpq's
documentation at
<a href="http://www.postgresql.org/docs/9.1/static/libpq-connect.html">http://www.postgresql.org/docs/9.1/static/libpq-connect.html</a>
for more details on how to create such strings.</p></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:PostgresConf" class="def">PostgresConf</a> <a href="src/Database-Persist-Postgresql.html#PostgresConf" class="link">Source</a> <a href="#t:PostgresConf" class="selflink">#</a></p><div class="doc"><p>Information required to connect to a PostgreSQL database
using <code>persistent</code>'s generic facilities. These values are the
same that are given to <code><a href="Database-Persist-Postgresql.html#v:withPostgresqlPool">withPostgresqlPool</a></code>.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:PostgresConf" class="def">PostgresConf</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><ul><li><dfn class="src"><a id="v:pgConnStr" class="def">pgConnStr</a> :: <a href="Database-Persist-Postgresql.html#t:ConnectionString">ConnectionString</a></dfn><div class="doc"><p>The connection string.</p></div></li><li><dfn class="src"><a id="v:pgPoolSize" class="def">pgPoolSize</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a></dfn><div class="doc"><p>How many connections should be held on the connection pool.</p></div></li></ul></div></td></tr></table></div><div class="subs instances"><p id="control.i:PostgresConf" class="caption collapser" onclick="toggleSection('i:PostgresConf')">Instances</p><div id="section.i:PostgresConf" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:PostgresConf:Data:1" class="instance expander" onclick="toggleSection('i:id:PostgresConf:Data:1')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Data.html#t:Data">Data</a> <a href="Database-Persist-Postgresql.html#t:PostgresConf">PostgresConf</a></span> <a href="src/Database-Persist-Postgresql.html#line-1051" class="link">Source</a> <a href="#t:PostgresConf" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:PostgresConf:Data:1" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:gfoldl">gfoldl</a> :: (<span class="keyword">forall</span> d b. <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Data.html#t:Data">Data</a> d => c (d -> b) -> d -> c b) -> (<span class="keyword">forall</span> g. g -> c g) -> <a href="Database-Persist-Postgresql.html#t:PostgresConf">PostgresConf</a> -> c <a href="Database-Persist-Postgresql.html#t:PostgresConf">PostgresConf</a> <a href="#v:gfoldl" class="selflink">#</a></p><p class="src"><a href="#v:gunfold">gunfold</a> :: (<span class="keyword">forall</span> b r. <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Data.html#t:Data">Data</a> b => c (b -> r) -> c r) -> (<span class="keyword">forall</span> r. r -> c r) -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Data.html#t:Constr">Constr</a> -> c <a href="Database-Persist-Postgresql.html#t:PostgresConf">PostgresConf</a> <a href="#v:gunfold" class="selflink">#</a></p><p class="src"><a href="#v:toConstr">toConstr</a> :: <a href="Database-Persist-Postgresql.html#t:PostgresConf">PostgresConf</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Data.html#t:Constr">Constr</a> <a href="#v:toConstr" class="selflink">#</a></p><p class="src"><a href="#v:dataTypeOf">dataTypeOf</a> :: <a href="Database-Persist-Postgresql.html#t:PostgresConf">PostgresConf</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Data.html#t:DataType">DataType</a> <a href="#v:dataTypeOf" class="selflink">#</a></p><p class="src"><a href="#v:dataCast1">dataCast1</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Typeable-Internal.html#t:Typeable">Typeable</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a>) t => (<span class="keyword">forall</span> d. <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Data.html#t:Data">Data</a> d => c (t d)) -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> (c <a href="Database-Persist-Postgresql.html#t:PostgresConf">PostgresConf</a>) <a href="#v:dataCast1" class="selflink">#</a></p><p class="src"><a href="#v:dataCast2">dataCast2</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Typeable-Internal.html#t:Typeable">Typeable</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a>) t => (<span class="keyword">forall</span> d e. (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Data.html#t:Data">Data</a> d, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Data.html#t:Data">Data</a> e) => c (t d e)) -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> (c <a href="Database-Persist-Postgresql.html#t:PostgresConf">PostgresConf</a>) <a href="#v:dataCast2" class="selflink">#</a></p><p class="src"><a href="#v:gmapT">gmapT</a> :: (<span class="keyword">forall</span> b. <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Data.html#t:Data">Data</a> b => b -> b) -> <a href="Database-Persist-Postgresql.html#t:PostgresConf">PostgresConf</a> -> <a href="Database-Persist-Postgresql.html#t:PostgresConf">PostgresConf</a> <a href="#v:gmapT" class="selflink">#</a></p><p class="src"><a href="#v:gmapQl">gmapQl</a> :: (r -> r' -> r) -> r -> (<span class="keyword">forall</span> d. <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Data.html#t:Data">Data</a> d => d -> r') -> <a href="Database-Persist-Postgresql.html#t:PostgresConf">PostgresConf</a> -> r <a href="#v:gmapQl" class="selflink">#</a></p><p class="src"><a href="#v:gmapQr">gmapQr</a> :: (r' -> r -> r) -> r -> (<span class="keyword">forall</span> d. <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Data.html#t:Data">Data</a> d => d -> r') -> <a href="Database-Persist-Postgresql.html#t:PostgresConf">PostgresConf</a> -> r <a href="#v:gmapQr" class="selflink">#</a></p><p class="src"><a href="#v:gmapQ">gmapQ</a> :: (<span class="keyword">forall</span> d. <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Data.html#t:Data">Data</a> d => d -> u) -> <a href="Database-Persist-Postgresql.html#t:PostgresConf">PostgresConf</a> -> [u] <a href="#v:gmapQ" class="selflink">#</a></p><p class="src"><a href="#v:gmapQi">gmapQi</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -> (<span class="keyword">forall</span> d. <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Data.html#t:Data">Data</a> d => d -> u) -> <a href="Database-Persist-Postgresql.html#t:PostgresConf">PostgresConf</a> -> u <a href="#v:gmapQi" class="selflink">#</a></p><p class="src"><a href="#v:gmapM">gmapM</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => (<span class="keyword">forall</span> d. <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Data.html#t:Data">Data</a> d => d -> m d) -> <a href="Database-Persist-Postgresql.html#t:PostgresConf">PostgresConf</a> -> m <a href="Database-Persist-Postgresql.html#t:PostgresConf">PostgresConf</a> <a href="#v:gmapM" class="selflink">#</a></p><p class="src"><a href="#v:gmapMp">gmapMp</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:MonadPlus">MonadPlus</a> m => (<span class="keyword">forall</span> d. <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Data.html#t:Data">Data</a> d => d -> m d) -> <a href="Database-Persist-Postgresql.html#t:PostgresConf">PostgresConf</a> -> m <a href="Database-Persist-Postgresql.html#t:PostgresConf">PostgresConf</a> <a href="#v:gmapMp" class="selflink">#</a></p><p class="src"><a href="#v:gmapMo">gmapMo</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:MonadPlus">MonadPlus</a> m => (<span class="keyword">forall</span> d. <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Data.html#t:Data">Data</a> d => d -> m d) -> <a href="Database-Persist-Postgresql.html#t:PostgresConf">PostgresConf</a> -> m <a href="Database-Persist-Postgresql.html#t:PostgresConf">PostgresConf</a> <a href="#v:gmapMo" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:PostgresConf:Read:2" class="instance expander" onclick="toggleSection('i:id:PostgresConf:Read:2')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Read.html#t:Read">Read</a> <a href="Database-Persist-Postgresql.html#t:PostgresConf">PostgresConf</a></span> <a href="src/Database-Persist-Postgresql.html#line-1051" class="link">Source</a> <a href="#t:PostgresConf" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:PostgresConf:Read:2" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:readsPrec">readsPrec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-ParserCombinators-ReadP.html#t:ReadS">ReadS</a> <a href="Database-Persist-Postgresql.html#t:PostgresConf">PostgresConf</a> <a href="#v:readsPrec" class="selflink">#</a></p><p class="src"><a href="#v:readList">readList</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-ParserCombinators-ReadP.html#t:ReadS">ReadS</a> [<a href="Database-Persist-Postgresql.html#t:PostgresConf">PostgresConf</a>] <a href="#v:readList" class="selflink">#</a></p><p class="src"><a href="#v:readPrec">readPrec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-ParserCombinators-ReadPrec.html#t:ReadPrec">ReadPrec</a> <a href="Database-Persist-Postgresql.html#t:PostgresConf">PostgresConf</a> <a href="#v:readPrec" class="selflink">#</a></p><p class="src"><a href="#v:readListPrec">readListPrec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-ParserCombinators-ReadPrec.html#t:ReadPrec">ReadPrec</a> [<a href="Database-Persist-Postgresql.html#t:PostgresConf">PostgresConf</a>] <a href="#v:readListPrec" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:PostgresConf:Show:3" class="instance expander" onclick="toggleSection('i:id:PostgresConf:Show:3')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:Show">Show</a> <a href="Database-Persist-Postgresql.html#t:PostgresConf">PostgresConf</a></span> <a href="src/Database-Persist-Postgresql.html#line-1051" class="link">Source</a> <a href="#t:PostgresConf" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:PostgresConf:Show:3" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:showsPrec">showsPrec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -> <a href="Database-Persist-Postgresql.html#t:PostgresConf">PostgresConf</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:ShowS">ShowS</a> <a href="#v:showsPrec" class="selflink">#</a></p><p class="src"><a href="#v:show">show</a> :: <a href="Database-Persist-Postgresql.html#t:PostgresConf">PostgresConf</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> <a href="#v:show" class="selflink">#</a></p><p class="src"><a href="#v:showList">showList</a> :: [<a href="Database-Persist-Postgresql.html#t:PostgresConf">PostgresConf</a>] -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:ShowS">ShowS</a> <a href="#v:showList" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:PostgresConf:FromJSON:4" class="instance expander" onclick="toggleSection('i:id:PostgresConf:FromJSON:4')"></span> <a href="file:///usr/share/doc/libghc-aeson-doc/html/Data-Aeson-Types.html#t:FromJSON">FromJSON</a> <a href="Database-Persist-Postgresql.html#t:PostgresConf">PostgresConf</a></span> <a href="src/Database-Persist-Postgresql.html#line-1053" class="link">Source</a> <a href="#t:PostgresConf" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:PostgresConf:FromJSON:4" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:parseJSON">parseJSON</a> :: <a href="file:///usr/share/doc/libghc-aeson-doc/html/Data-Aeson-Types.html#t:Value">Value</a> -> <a href="file:///usr/share/doc/libghc-aeson-doc/html/Data-Aeson-Types.html#t:Parser">Parser</a> <a href="Database-Persist-Postgresql.html#t:PostgresConf">PostgresConf</a> <a href="#v:parseJSON" class="selflink">#</a></p><p class="src"><a href="#v:parseJSONList">parseJSONList</a> :: <a href="file:///usr/share/doc/libghc-aeson-doc/html/Data-Aeson-Types.html#t:Value">Value</a> -> <a href="file:///usr/share/doc/libghc-aeson-doc/html/Data-Aeson-Types.html#t:Parser">Parser</a> [<a href="Database-Persist-Postgresql.html#t:PostgresConf">PostgresConf</a>] <a href="#v:parseJSONList" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:PostgresConf:PersistConfig:5" class="instance expander" onclick="toggleSection('i:id:PostgresConf:PersistConfig:5')"></span> <a href="file:///usr/share/doc/libghc-persistent-doc/html/Database-Persist-Class.html#t:PersistConfig">PersistConfig</a> <a href="Database-Persist-Postgresql.html#t:PostgresConf">PostgresConf</a></span> <a href="src/Database-Persist-Postgresql.html#line-1071" class="link">Source</a> <a href="#t:PostgresConf" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:PostgresConf:PersistConfig:5" class="inst-details hide"><div class="subs associated-types"><p class="caption">Associated Types</p><p class="src"><span class="keyword">type</span> <a href="file:///usr/share/doc/libghc-persistent-doc/html/Database-Persist-Class.html#t:PersistConfigBackend">PersistConfigBackend</a> <a href="Database-Persist-Postgresql.html#t:PostgresConf">PostgresConf</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a>) -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a> <a href="#t:PersistConfigBackend" class="selflink">#</a></p><p class="src"><span class="keyword">type</span> <a href="file:///usr/share/doc/libghc-persistent-doc/html/Database-Persist-Class.html#t:PersistConfigPool">PersistConfigPool</a> <a href="Database-Persist-Postgresql.html#t:PostgresConf">PostgresConf</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a> <a href="#t:PersistConfigPool" class="selflink">#</a></p></div> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:loadConfig">loadConfig</a> :: <a href="file:///usr/share/doc/libghc-aeson-doc/html/Data-Aeson-Types.html#t:Value">Value</a> -> <a href="file:///usr/share/doc/libghc-aeson-doc/html/Data-Aeson-Types.html#t:Parser">Parser</a> <a href="Database-Persist-Postgresql.html#t:PostgresConf">PostgresConf</a> <a href="#v:loadConfig" class="selflink">#</a></p><p class="src"><a href="#v:applyEnv">applyEnv</a> :: <a href="Database-Persist-Postgresql.html#t:PostgresConf">PostgresConf</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="Database-Persist-Postgresql.html#t:PostgresConf">PostgresConf</a> <a href="#v:applyEnv" class="selflink">#</a></p><p class="src"><a href="#v:createPoolConfig">createPoolConfig</a> :: <a href="Database-Persist-Postgresql.html#t:PostgresConf">PostgresConf</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> (<a href="file:///usr/share/doc/libghc-persistent-doc/html/Database-Persist-Class.html#t:PersistConfigPool">PersistConfigPool</a> <a href="Database-Persist-Postgresql.html#t:PostgresConf">PostgresConf</a>) <a href="#v:createPoolConfig" class="selflink">#</a></p><p class="src"><a href="#v:runPool">runPool</a> :: (<a href="file:///usr/share/doc/libghc-monad-control-doc/html/Control-Monad-Trans-Control.html#t:MonadBaseControl">MonadBaseControl</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> m, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m) => <a href="Database-Persist-Postgresql.html#t:PostgresConf">PostgresConf</a> -> <a href="file:///usr/share/doc/libghc-persistent-doc/html/Database-Persist-Class.html#t:PersistConfigBackend">PersistConfigBackend</a> <a href="Database-Persist-Postgresql.html#t:PostgresConf">PostgresConf</a> m a -> <a href="file:///usr/share/doc/libghc-persistent-doc/html/Database-Persist-Class.html#t:PersistConfigPool">PersistConfigPool</a> <a href="Database-Persist-Postgresql.html#t:PostgresConf">PostgresConf</a> -> m a <a href="#v:runPool" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:PostgresConf:PersistConfigPool:6" class="instance expander" onclick="toggleSection('i:id:PostgresConf:PersistConfigPool:6')"></span> <span class="keyword">type</span> <a href="file:///usr/share/doc/libghc-persistent-doc/html/Database-Persist-Class.html#t:PersistConfigPool">PersistConfigPool</a> <a href="Database-Persist-Postgresql.html#t:PostgresConf">PostgresConf</a></span> <a href="src/Database-Persist-Postgresql.html#line-1073" class="link">Source</a> <a href="#t:PostgresConf" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:PostgresConf:PersistConfigPool:6" class="inst-details hide"><div class="src"><span class="keyword">type</span> <a href="file:///usr/share/doc/libghc-persistent-doc/html/Database-Persist-Class.html#t:PersistConfigPool">PersistConfigPool</a> <a href="Database-Persist-Postgresql.html#t:PostgresConf">PostgresConf</a> = <a href="file:///usr/share/doc/libghc-persistent-doc/html/Database-Persist-Sql.html#t:ConnectionPool">ConnectionPool</a></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:PostgresConf:PersistConfigBackend:7" class="instance expander" onclick="toggleSection('i:id:PostgresConf:PersistConfigBackend:7')"></span> <span class="keyword">type</span> <a href="file:///usr/share/doc/libghc-persistent-doc/html/Database-Persist-Class.html#t:PersistConfigBackend">PersistConfigBackend</a> <a href="Database-Persist-Postgresql.html#t:PostgresConf">PostgresConf</a></span> <a href="src/Database-Persist-Postgresql.html#line-1072" class="link">Source</a> <a href="#t:PostgresConf" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:PostgresConf:PersistConfigBackend:7" class="inst-details hide"><div class="src"><span class="keyword">type</span> <a href="file:///usr/share/doc/libghc-persistent-doc/html/Database-Persist-Class.html#t:PersistConfigBackend">PersistConfigBackend</a> <a href="Database-Persist-Postgresql.html#t:PostgresConf">PostgresConf</a> = <a href="file:///usr/share/doc/libghc-persistent-doc/html/Database-Persist-Sql.html#t:SqlPersistT">SqlPersistT</a></div></div></td></tr></table></div></div></div><div class="top"><p class="src"><a id="v:openSimpleConn" class="def">openSimpleConn</a> :: <a href="file:///usr/share/doc/libghc-persistent-doc/html/Database-Persist-Sql-Types-Internal.html#t:IsSqlBackend">IsSqlBackend</a> backend => <a href="file:///usr/share/doc/libghc-persistent-doc/html/Database-Persist-Sql-Types-Internal.html#t:LogFunc">LogFunc</a> -> <a href="file:///usr/share/doc/libghc-postgresql-simple-doc/html/Database-PostgreSQL-Simple-Internal.html#t:Connection">Connection</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> backend <a href="src/Database-Persist-Postgresql.html#openSimpleConn" class="link">Source</a> <a href="#v:openSimpleConn" class="selflink">#</a></p><div class="doc"><p>Generate a <code><a href="file:///usr/share/doc/libghc-persistent-doc/html/Database-Persist-Sql-Types-Internal.html#t:SqlBackend">SqlBackend</a></code> from a <code><a href="file:///usr/share/doc/libghc-postgresql-simple-doc/html/Database-PostgreSQL-Simple-Internal.html#t:Connection">Connection</a></code></p></div></div><div class="top"><p class="src"><a id="v:tableName" class="def">tableName</a> :: <a href="file:///usr/share/doc/libghc-persistent-doc/html/Database-Persist-Class.html#t:PersistEntity">PersistEntity</a> record => record -> <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> <a href="src/Database-Persist-Postgresql.html#tableName" class="link">Source</a> <a href="#v:tableName" class="selflink">#</a></p><div class="doc"><p>get the SQL string for the table that a PeristEntity represents
Useful for raw SQL queries</p></div></div><div class="top"><p class="src"><a id="v:fieldName" class="def">fieldName</a> :: <a href="file:///usr/share/doc/libghc-persistent-doc/html/Database-Persist-Class.html#t:PersistEntity">PersistEntity</a> record => <a href="file:///usr/share/doc/libghc-persistent-doc/html/Database-Persist-Class.html#t:EntityField">EntityField</a> record typ -> <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> <a href="src/Database-Persist-Postgresql.html#fieldName" class="link">Source</a> <a href="#v:fieldName" class="selflink">#</a></p><div class="doc"><p>get the SQL string for the field that an EntityField represents
Useful for raw SQL queries</p></div></div><div class="top"><p class="src"><a id="v:mockMigration" class="def">mockMigration</a> :: <a href="file:///usr/share/doc/libghc-persistent-doc/html/Database-Persist-Sql.html#t:Migration">Migration</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> () <a href="src/Database-Persist-Postgresql.html#mockMigration" class="link">Source</a> <a href="#v:mockMigration" class="selflink">#</a></p><div class="doc"><p>Mock a migration even when the database is not present.
This function performs the same functionality of <code><a href="file:///usr/share/doc/libghc-persistent-doc/html/Database-Persist-Sql.html#v:printMigration">printMigration</a></code>
with the difference that an actualy database isn't needed for it.</p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.17.3</p></div></body></html>
|