pgsql-simple-0.1.2: A mid-level PostgreSQL client library.

Safe HaskellSafe-Inferred

Database.PostgreSQL.Base.Types

Synopsis

Documentation

data Connection Source

A database connection.

data Field Source

A field description.

Constructors

Field 

Instances

data Result Source

Result of a database query.

Instances

data Type Source

Constructors

Short

2 bytes, small-range integer

Long

4 bytes, usual choice for integer

LongLong

8 bytes large-range integer

Decimal

variable, user-specified precision, exact, no limit

Numeric

variable, user-specified precision, exact, no limit

Real

4 bytes, variable-precision, inexact

DoublePrecision

8 bytes, variable-precision, inexact

CharVarying

character varying(n), varchar(n), variable-length

Characters

character(n), char(n), fixed-length

Text

text, variable unlimited length

Lazy. Decoded from UTF-8 into Haskell native encoding.

Boolean

boolean, 1 byte, state of true or false

Timestamp

timestamp without time zone

More information about PostgreSQL’s dates here: http://www.postgresql.org/docs/current/static/datatype-datetime.html

TimestampWithZone

timestamp with time zone

Date

date, 4 bytes julian day

Time

8 bytes, time of day (no date)

Instances

data Size Source

A field size.

Constructors

Varying 
Size Int16 

Instances

data FormatCode Source

A text format code. Will always be TextCode for DESCRIBE queries.

Constructors

TextCode 
BinaryCode 

data Modifier Source

A type-specific modifier.

Constructors

Modifier 

type ObjectId = IntSource

A PostgreSQL object ID.

newtype Pool Source

Constructors

Pool 

Fields

unPool :: MVar PoolState
 

data PoolState Source

A connection pool.

data ConnectionError Source

Constructors

QueryError (Maybe String)

Query returned an error.

QueryEmpty

The query was empty.

AuthenticationFailed String

Connecting failed due to authentication problem.

InitializationError String

Initialization (e.g. getting data types) failed.

ConnectionLost

Connection was lost when using withConnection.

UnsupportedAuthenticationMethod Int32 String

Unsupported method of authentication (e.g. md5).

GeneralError String