Version 0.3.4.0 (2013-07-23) * Added direct support for COPY IN and COPY OUT, without having to use raw postgresql-libpq calls and postgresql-simple's Internal module. * Changed `getNotification` so that it throws a IOError (resource vanished) exception instead of an ErrorCall exception when it fails to fetch the connection's file descriptor from libpq. Version 0.3.3.2 (2013-06-18) * Optimized the definition of `mconcat` in the Monoid instance for the Query type, courtesy of Joey Adams. Version 0.3.3.1 (2013-06-06) * `getNotification` now works on Windows, albeit using a one-second polling loop, courtesy of Joey Adams. Version 0.3.3.0 (2013-05-29) * Fixed two issues with the fold operator: fold would raise the wrong exception, and gave the database cursor a static name preventing folds from being nested. Thanks to Joey Adams for his work on these issues. Version 0.3.2.0 (2013-05-20) * Added a savepoint abstraction to the Transaction module, courtesy of Joey Adams Version 0.3.1.2 (2013-04-29) * Fixed hstore parser to not unnecessarily reverse the key-value pairs Version 0.3.1.1 (2013-04-29) * Fixed hstore parser to recognize empty hstores, courtesy of Simon Meier Version 0.3.1.0 (2013-04-26) * Added support for Range and Composite types to the TypeInfo system. * Added support for hstore types in the Simple.HStore module. * Improved documentation of the FromField module. Version 0.3.0.1 (2013-03-26) * A large chunk of the documentation inside the FromField module had silently failed to render in Haddock. Version 0.3.0.0 (2013-03-25) * Added support for PostgreSQL's Array Types. Thanks to Jason Dusek for his work on this feature. * Added a brand new TypeInfo system that gives FromField instances convenient and efficient access to the pg_type metatable. This replaced the older typename cache, and was neccesary to properly support postgres array types. Thanks to Bas van Dijk for his work on this feature. * Changed the type of the `fromField` and `fromRow` methods to allow a restricted set of IO actions, and stopped pre-calculating the type name of every column. As a result, the type of the `typename` operator changed from `Field -> ByteString` to `Field -> Conversion ByteString`, where Conversion is the new monad that conversion computations run inside. * Improved the documentation of the FromField module. * Added the Database.PostgreSQL.Simple.Errors module, which offers some predicates and functions for interpreting SqlError values, courtesy of Leonid Onokhov. * Added a the name of a column and the associated table's object identifier to ResultError exceptions, courtesy of Jeff Chu. * Moved most of the more detailed transaction operators into the Database.PostgreSQL.Simple.Transaction module. * Changed withTransactionModeRetry to accept a predicate of which SqlErrors to retry, due to the fact that serialization errors can sometimes manifest themselves as constraint violations. Thanks to Oliver Charles for pointing this out and implementing the change. * Added simple tests of the fold operator, thanks to Joey Adams. * Added simple tests of the array conversion code. * Added recognition of -- comments in the quasiquoter, which are now stripped out. Version 0.2.4.1 (2012-08-29) * Fixed the documentation of `In`. Thanks to rekado and dstcruz for pointing this out. Version 0.2.4.0 (2012-08-23) * Added the `withTransactionSerializable` and `withTransactionModeRetry` operators, thanks to Joey Adams. Version 0.2.3.0 (2012-08-09) * Added the `returning` operator, thanks to Jason Dusek Version 0.2.2.0 (2012-07-26) * Added a ToRow instance for the (:.) type, courtesy of Leonid Onokhov * Added the type oid for PostgreSQL's `uuid` type to BuiltinTypes Version 0.2.1.0 (2012-07-23) * Added the FromRow.fieldWith operator, thanks to Leonid Onokhov * Added a type synonym for FieldParser Version 0.2.0.1 (2012-06-21) * Fixed a compatibility problem with PostgreSQL 8.1, which does not allow clients to set their own value for `standard_conforming_strings`. This connection variable is still set to `on` for PostgreSQL 8.2 and later. Version 0.2: (2012-06-19) * Removed the conversion from `timestamp` to `UTCTime`. Some code will be broken even though it will still compile. * Renamed a number of data constructors, mostly in the BuiltinTypes module. * Exported ToRow/FromRow from Database.PostgreSQL.Simple Version 0.1.4.3: (2012-06-10) * Fix language extensions for compatibility with GHC 7.0 Version 0.1.4.2: (2012-06-10) * Fix a wayward dependency on Text. Version 0.1.4.1: (2012-06-10) * Added support for timezones with minutes in their UTC offset. Version 0.1.4: (2012-06-10) * Removed pcre-light dependency, courtesy of Joey Adams. * Reworked support for the Time types. * The conversion from PostgreSQL's `timestamp` (without time zone) type to Haskell's `UTCTime` type is deprecated and will be removed in 0.2. * `Data.Time.LocalTime` now has `FromField`/`ToField` instances. It is now the preferred way of dealing with `timestamp` (without time zone). * `Database.PostgreSQL.Simple.Time` is a new module that offers types that accomodate PostgreSQL's infinities. * All time-related `FromField`/`ToField` instances are now based on new, higher-speed parsers and printers instead of those provided by the time package included in GHC. * Planned breaking changes for 0.2: * Removing the conversion from `timestamp` to `UTCTime`. * Renaming some of the type names in `BuiltinTypes`. Version 0.1.3: (2012-05-30) * Made ZonedTime an instance of FromField and ToField * Added getNotificationNonBlocking Version 0.1.2: (2012-05-09) * Switched to libpq-based escaping for bytea types; Binary now works with PostgreSQL 8 courtesy of Joey Adams. * postgresql-simple now sets standard_conforming_strings to "on". This per-connection variable is initialized according to the server configuration, which defaults to "off" for PostgreSQL < 9, and "on" for PostgreSQL >= 9. You may need to adjust any string literals in your SQL queries, or set the variable yourself. * Exported (:.) from Database.PostgreSQL.Simple Version 0.1.1: (2012-05-06) * Added some preliminary documentation for the Ok, Notification, and LargeObjects modules * Implemented the `fail` method for the monad instance for `Ok`. * Fixed a bug relating to handling the transaction level Version 0.1: (2012-05-04) * Renamed several modules, typeclasses, and functions: QueryParams (renderParams) -> ToRow (toRow) QueryResults (convertResults) -> FromRow (fromRow) Param (render) -> ToField (toField) Result (convert) -> FromField (fromField) * Added the `Database.PostgreSQL.Simple.Ok` module, a variation of `Either SomeException` that has an instance for `Alternative` and also uses a list of exceptions to track the ways it has failed. * Changed the return type of `fromField` and `fromRow` from `Either SomeException` to `Ok`. * Thanks to suggestions from Ozgun Ataman, the `FromRow` typeclass has been massively improved. The result is simpler definitions and better compositionality. Also, user-defined instances need not be to be concerned about forcing the converted results to WHNF. Here is an example comparing the old to the new: instance (Result a, Result b) => QueryResults (a,b) where convertResults [fa,fb] [va,vb] = do !a <- convert fa va !b <- convert fb vb return (a,b) convertResults fs vs = convertError fs vs 2 instance (FromField a, FromField b) => FromRow (a,b) where fromRow = (,) <$> field <*> field * Added `(:.)`, a pair that allows one to compose `FromRow` instances: instance (FromRow a, FromRow b) => FromRow (a :. b) where fromRow = (:.) <$> fromRow <*> fromRow * Moved the contents `Field` module into the `FromField` module. * Removed the `RawResult` type. * Added `DefaultIsolationLevel` as a distinct `IsolationLevel` option and `DefaultReadWriteMode` as a distinct `ReadWriteMode`.