postgresql-simple-0.4.2.2: Mid-Level PostgreSQL client library

Maintainerleon@melding-monads.com
Safe HaskellNone

Database.PostgreSQL.Simple.LargeObjects

Description

Support for PostgreSQL's Large Objects; see http://www.postgresql.org/docs/9.1/static/largeobjects.html for more information.

Note that Large Object File Descriptors are only valid within a single database transaction, so if you are interested in using anything beyond loCreat, loCreate, and loUnlink, you will need to run the entire sequence of functions in a transaction. As loImport and loExport are simply C functions that call loCreat, loOpen, loRead, and loWrite, and do not perform any transaction handling themselves, they also need to be wrapped in an explicit transaction.

Synopsis

Documentation

loImport :: Connection -> FilePath -> IO OidSource

loImportWithOid :: Connection -> FilePath -> Oid -> IO OidSource

loExport :: Connection -> Oid -> FilePath -> IO ()Source

loWrite :: Connection -> LoFd -> ByteString -> IO IntSource

loRead :: Connection -> LoFd -> Int -> IO ByteStringSource

loSeek :: Connection -> LoFd -> SeekMode -> Int -> IO IntSource

loTell :: Connection -> LoFd -> IO IntSource

loTruncate :: Connection -> LoFd -> Int -> IO ()Source

newtype Oid

Constructors

Oid CUInt 

Instances

Eq Oid 
Ord Oid 
Read Oid 
Show Oid 
Storable Oid 
ToField Oid 
FromField Oid

oid

data LoFd

LoFd is a Large Object (pseudo) File Descriptor. It is understood by libpq but not by operating system calls.

Instances

Eq LoFd 
Ord LoFd 
Show LoFd 

data IOMode

Instances

Enum IOMode 
Eq IOMode 
Ord IOMode 
Read IOMode 
Show IOMode 
Ix IOMode 

data SeekMode

Instances

Enum SeekMode 
Eq SeekMode 
Ord SeekMode 
Read SeekMode 
Show SeekMode 
Ix SeekMode