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
|
{- |
Module : Database.HDBC.PostgreSQL
Copyright : Copyright (C) 2005-2011 John Goerzen
License : BSD3
Maintainer : John Goerzen <jgoerzen@complete.org>
Stability : provisional
Portability: portable
HDBC driver interface for PostgreSQL 8.x
Written by John Goerzen, jgoerzen\@complete.org
/NOTE ON DATES AND TIMES/
The recommended correspondence between PostgreSQL date and time types and HDBC SqlValue
types is:
* SqlLocalDate: DATE
* SqlLocalTimeOfDay: TIME WITHOUT TIME ZONE
* SqlZonedLocalTimeOfDay: TIME WITH TIME ZONE
* SqlLocalTime: TIMESTAMP WITHOUT TIME ZONE
* SqlZonedTime: TIMESTAMP WITH TIME ZONE
* SqlUTCTime: TIMESTAMP WITH TIME ZONE
* SqlDiffTime: INTERVAL
* SqlPOSIXTime: NUMERIC
* SqlEpochTime: INTEGER
* SqlTimeDiff: INTERVAL
Other combinations are possible, and may even be converted automatically.
The above simply represents the types that seem the most logical correspondence,
and thus are tested by the HDBC-PostgreSQL test suite.
-}
module Database.HDBC.PostgreSQL
(
-- * Connecting to Databases
connectPostgreSQL, withPostgreSQL,
connectPostgreSQL', withPostgreSQL',
Connection,
-- * Transactions
begin,
-- * PostgreSQL Error Codes
--
-- |When an @SqlError@ is thrown, the field @seState@ is set to one of the following
-- error codes.
module Database.HDBC.PostgreSQL.ErrorCodes,
-- * Threading
-- $threading
)
where
import Database.HDBC.PostgreSQL.Connection(connectPostgreSQL, withPostgreSQL,
connectPostgreSQL', withPostgreSQL',
begin, Connection())
import Database.HDBC.PostgreSQL.ErrorCodes
{- $threading
Provided the local libpq library is thread-safe, multiple 'Connection's may be used
to have concurrent database queries. Concurrent queries issued on a single
'Connection' will be performed serially.
When the local libpq library is not thread-safe (ie. it has not been compiled with
--enable-thread-safety), only a single database function will be performed at a time.
-}
|