Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

487 lines (338 sloc) 18.622 kB
Version 0.5.0.0
* Removed the deprecated BuiltinTypes module
* Modified the SQL quasiquoter so that it returns a Query, not
an overloaded string, and so that the OverloadedStrings language
extension is no longer necessary, thanks to Mike Ledger
* Moved away from blaze-builder in favor of bytestring-builder. This
shouldn't affect very many people, but does reduce the transitive
dependencies.
* Added support for exclusion violations to the ConstraintViolation
type in the Errors module, thanks to Joao Cristovao.
* Moved away from the uuid package in favor of the uuid-types package,
thanks to Bardur Arantsson. This shouldn't affect anybody, but does
reduce the transitive dependencies.
* Postgresql-simple now explicitly assumes the UTF8 character encoding
for communication between the client and server. All database encodings
support UTF8 except for Mule Internal Code. An exception should be
raised upon connecting to a database by the backend if the backend cannot
accomodate this requirement.
* Added Eq and Typeable instance for Connection.
* Added the foldWith, forEachWith, and returningWith families of functions
courtesy of Travis Staton.
* Support for Ranged types.
* The FromField instance for JSON now allows for top-level values that
are not objects or arrays.
* The timestamp parsers are now slightly more flexible in what they accept.
Thanks goes to Janne Hellsten for his contributions to this issue.
* Optimized the parsing of timestamps with fractional seconds, shaving
approximately 17% off the time taken.
Version 0.4.10.0 (2015-02-26)
* Added a blurb about SSL/TLS in the documentation for connectPostgreSQL
* Moved some functions into the Internal module, courtesy of Aleksey
Uimanov.
Version 0.4.9.0 (2014-12-27)
* Made the fromField method for PGArray available as pgArrayFieldParser,
outside of the typeclass courtesy of Tom Ellis.
* Fixed a missing OverloadedStrings pragma in the documentation of SqlQQ.
* Fixed deprecation warnings, courtesy of Simon Hengel.
Version 0.4.8.0 (2014-11-24)
* Added support for postgresql's citext type extension via the
case-insensitive package.
* Added the function parseHStoreList to the HStore module.
Version 0.4.7.0 (2014-10-27)
* Added support for very old timestamps to UTCTime. Depending on time
zone, very old timestamps can be returned with a offset from UTC that
contains seconds.
All timezones in the TZ database moved to a time standard offset an
integer number of minutes from UTC before 1973, almost all locations
moved before 1938, and a solid majority moved before 1921.
ZonedTime assumes offsets are a whole number of minutes, and thus the
conversion to ZonedTime does not support these timestamps and will
still throw a conversion error.
Note that PostgreSQL's "timestamp with time zone" (or "timestamptz")
type is nearly universally misunderstood. For an explanation, see:
https://github.com/lpsmith/postgresql-simple/issues/69
Thanks to Michael Snoyman for his assistance with this issue.
Version 0.4.6.0 (2014-10-07)
* Added an instance ToField NominalDiffTime.
Version 0.4.5.0 (2014-09-26)
* Added support for retrieving NaN and ±Infinity floating point values
from postgres to the FromField instances for Float, Double, and Rational.
The instance for Scientific is unchanged due to the fact it has no
way of representing these special values. Thanks goes to Tom Nielsen
for reporting the issue.
Version 0.4.4.1 (2014-09-07)
* Fixed a rather serious bug that prevented the COPY module from working
at all on unix clients since version 0.4.3.0. Thanks goes to
Dmitry Dzhus for reporting the issue.
* Added a regression test for the COPY module to the test suite.
Version 0.4.4.0 (2014-08-26)
* Added the jsonb type debuting in PostgreSQL 9.4 to the TypeInfo.Static
and Builtin tables, and extended the out-of-box json instances to
be compatible with the new type. Thanks to Tobias Florek for the
patch.
* Ported some expanded documentation from mysql-simple, and fixed
a documentation typo.
Version 0.4.3.0 (2014-07-10)
* connect and exec now use libpq asynchronously on non-Windows platforms.
This means we are using threadWaitRead and threadWaitWrite to
have GHC's IO manager schedule non-blocking C calls to libpq,
instead of using blocking C calls and having the OS kernel do the
scheduling. Among other things, this now means that System.Timeout
will work with connect and exec on unix platforms.
* connect and exec now throw IOErrors instead of SQLErrors in
some cases. The intention is for SQLErrors to represent
an error returned by the server, and to use IOErrors for errors
that originate from client-side code. However, this goal
isn't perfectly achieved as of yet.
Version 0.4.2.3 (2014-06-04)
* This is strictly a documentation release, with no code changes.
* Fixed several documentation typos, thanks to Chris Allen and remdezx.
* Expanded the documentation of connectPostgreSQL, including a short
overview of common use cases and two new links to the official Postgres
documentation about the authentication process.
* De-emphasized connect and ConnectInfo in favor of connectPostgreSQL.
Version 0.4.2.2 (2014-05-15)
* Fixed compatibility with scientific-0.3.*, thanks to Adam Bergmark
* Improved documentation of the FromField module, as well as the fold,
foldWithOptions, executeMany, and returning operators.
Version 0.4.2.1 (2014-03-27)
* Fixed bug in Values syntax generation
* Improved documentation, including examples of multi-row update,
a better example for Values, documenting the inaccuracies in reading
floating point numbers from the database, and the IsString instance
for QualifiedIdentifier.
Version 0.4.2.0 (2014-03-22)
* Added ToField and FromField instances for the scientific package
* Changed the Identifier and QualifiedIdentifier to use Text in
order to avoid encoding errors. Technically this requires a
major verson bump, but let's pretend 0.4.1.0 didn't happen.
* Removed non-exhaustive cases in the ToField instance for Values,
and tweaked error messages.
Version 0.4.1.0 (2014-03-22)
* Fixed the parsing of arrays containing null values, courtesy of
Francesco Mazzoli
* Added support for properly escaped identifiers, courtesy of
Tobias Florek. See the new Identifier and QualifiedIdentifier
types inside Database.PostgreSQL.Simple.Types.
* Added support for parameterized VALUES expressions. This is
more general than executeMany and returning. See the
Database.PostgreSQL.Simple.Types.Values data type.
Version 0.4.0.2 (2014-01-12)
* Tweaked C preprocessor directive to be more portable
* Tweaked testsuite for compatibility with aeson-0.7
Version 0.4.0.1 (2013-12-21)
* Relaxed dependency on aeson to >= 0.6
* Update the documentation of `fromField`
Version 0.4.0.0 (2013-12-21)
* Changed the calling code of `fromField` so that it always sends
a copy of the raw data. This should be a small but significant
performance bump for most people most of the time; however it
may slow down retrieval of large values not converted directly
to ByteString, such as large json, hstore, and array values.
See commit 8635f8 for more information.
* Added the PGArray type. Thanks to Joey Adams for the suggestion
* Fixed JSON decoding, which was almost entirely broken up until now,
due to bugs in the version of aeson currently available on Hackage.
Thanks to Amit Levy for the report.
* Added FromField instances for IORef, MVar, and IOVector.
Version 0.3.10.0 (2013-12-17)
* Added the queryWith function, courtesy of Leonid Onokhov
* Added the Default type, for representing postgresql's default values
Version 0.3.9.1 (2013-10-28)
* Removed dependency on hashable
Version 0.3.9.0 (2013-10-27)
* Added FromField and ToField instances for the `uuid` package,
courtesy of Bas van Dijk.
* Added instance FromRow (Maybe a) for most pre-packaged FromRow
instances. See issue #64 for some discussion.
* Added the fromBinary, fromHStoreMap, and fromHStoreList newtype
unwrapper functions, courtesy of Bas van Dijk.
Version 0.3.8.0 (2013-10-11)
* Fixed the example code in `FromField`, thanks to Adam Bergmark.
* Added `Notification.getBackendPID`.
Version 0.3.7.1 (2013-09-12)
* Relaxed the dependency on bytestring-0.10 back to bytestring-0.9,
courtesy of Michael Snoyman
Version 0.3.7.0 (2013-09-11)
* Added `aeson` as a dependency.
* Added ToField and FromField instances for aeson's JSON.Value type,
courtesy of Bas van Dijk.
* Added toJSONField and fromJSONField helper functions for declaring
FromField/ToField JSON instances to other Haskell types, courtesy
of Bas van Dijk.
* Added a FromField instance for (), corresponding to postgresql's void
type.
* Added liftConversion and liftRowParser functions to the Internal
module, for lifting IO actions into the respective monads.
* The SqlError predicates available in the Transaction module are now
also exported from the Errors module.
* Various documentation fixes.
Version 0.3.6.0 (2013-08-19)
* Added the json type to BuiltinTypes and TypeInfo.Static, courtesy of
Manuel Gómez.
* Removed the remaining internal dependencies on BuiltinTypes from
FromField. Added the TypeInfo.Macro module as a result.
* Deprecated the BuiltinTypes module, which will be removed several
months from now. Fixed the example code in FromField to reflect
this change.
Version 0.3.5.0 (2013-08-09)
* Added an FromRow instance for Vector, semantically identical to the
existing FromRow instance for [], courtesy of Doug Beardsley
* Reworked the documentation for the Copy module, and tweaked the
documentation for the LargeObjects module.
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`.
Jump to Line
Something went wrong with that request. Please try again.