This file is indexed.

/usr/share/doc/libghc-persistent-postgresql-doc/html/persistent-postgresql.txt is in libghc-persistent-postgresql-doc 2.6-2.

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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Backend for the persistent library using postgresql.
--   
--   Based on the postgresql-simple package
@package persistent-postgresql
@version 2.6


-- | A postgresql backend for persistent.
module Database.Persist.Postgresql

-- | 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 <a>ConnectionPool</a> outside the action
--   since it may be already been released.
withPostgresqlPool :: (MonadBaseControl IO m, MonadLogger m, MonadIO m, IsSqlBackend backend) => ConnectionString -> Int -> (Pool backend -> m a) -> m a

-- | Same as <a>withPostgresqlPool</a>, but instead of opening a pool of
--   connections, only one connection is opened.
withPostgresqlConn :: (MonadIO m, MonadBaseControl IO m, MonadLogger m, IsSqlBackend backend) => ConnectionString -> (backend -> m a) -> m a

-- | Create a PostgreSQL connection pool. Note that it's your
--   responsibility to properly close the connection pool when unneeded.
--   Use <a>withPostgresqlPool</a> for an automatic resource control.
createPostgresqlPool :: (MonadIO m, MonadBaseControl IO m, MonadLogger m, IsSqlBackend backend) => ConnectionString -> Int -> m (Pool backend)

-- | Same as <a>createPostgresqlPool</a>, 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:
--   
--   
--   <a>https://groups.google.com/d/msg/yesodweb/qUXrEN_swEo/O0pFwqwQIdcJ</a>
--   
--   Since 2.1.3
createPostgresqlPoolModified :: (MonadIO m, MonadBaseControl IO m, MonadLogger m, IsSqlBackend backend) => (Connection -> IO ()) -> ConnectionString -> Int -> m (Pool backend)

-- | A <tt>libpq</tt> connection string. A simple example of connection
--   string would be <tt>"host=localhost port=5432 user=test dbname=test
--   password=test"</tt>. Please read libpq's documentation at
--   <a>http://www.postgresql.org/docs/9.1/static/libpq-connect.html</a>
--   for more details on how to create such strings.
type ConnectionString = ByteString

-- | Information required to connect to a PostgreSQL database using
--   <tt>persistent</tt>'s generic facilities. These values are the same
--   that are given to <a>withPostgresqlPool</a>.
data PostgresConf
PostgresConf :: ConnectionString -> Int -> PostgresConf

-- | The connection string.
[pgConnStr] :: PostgresConf -> ConnectionString

-- | How many connections should be held on the connection pool.
[pgPoolSize] :: PostgresConf -> Int

-- | Generate a <a>Connection</a> from a <a>Connection</a>
openSimpleConn :: (IsSqlBackend backend) => LogFunc -> Connection -> IO backend

-- | get the SQL string for the table that a PeristEntity represents Useful
--   for raw SQL queries
tableName :: (PersistEntity record) => record -> Text

-- | get the SQL string for the field that an EntityField represents Useful
--   for raw SQL queries
fieldName :: (PersistEntity record) => EntityField record typ -> Text

-- | Mock a migration even when the database is not present. This function
--   performs the same functionality of <a>printMigration</a> with the
--   difference that an actualy database isn't needed for it.
mockMigration :: Migration -> IO ()
instance Data.Data.Data Database.Persist.Postgresql.PostgresConf
instance GHC.Read.Read Database.Persist.Postgresql.PostgresConf
instance GHC.Show.Show Database.Persist.Postgresql.PostgresConf
instance GHC.Classes.Ord Database.Persist.Postgresql.Unknown
instance GHC.Read.Read Database.Persist.Postgresql.Unknown
instance GHC.Show.Show Database.Persist.Postgresql.Unknown
instance GHC.Classes.Eq Database.Persist.Postgresql.Unknown
instance GHC.Show.Show Database.Persist.Postgresql.PostgresServerVersionError
instance GHC.Exception.Exception Database.Persist.Postgresql.PostgresServerVersionError
instance Database.PostgreSQL.Simple.ToField.ToField Database.Persist.Postgresql.P
instance Database.PostgreSQL.Simple.FromField.FromField Database.Persist.Postgresql.Unknown
instance Database.PostgreSQL.Simple.ToField.ToField Database.Persist.Postgresql.Unknown
instance Data.Aeson.Types.Class.FromJSON Database.Persist.Postgresql.PostgresConf
instance Database.Persist.Class.PersistConfig.PersistConfig Database.Persist.Postgresql.PostgresConf