postgresql-libpq 0.9.4.1 → 0.9.4.2
raw patch · 3 files changed
+62/−14 lines, 3 filesdep +postgresql-libpqdep ~Win32dep ~basedep ~bytestringnew-uploaderPVP ok
version bump matches the API change (PVP)
Dependencies added: postgresql-libpq
Dependency ranges changed: Win32, base, bytestring, unix
API changes (from Hackage documentation)
Files
- CHANGELOG.md +6/−0
- postgresql-libpq.cabal +27/−14
- test/Smoke.hs +29/−0
+ CHANGELOG.md view
@@ -0,0 +1,6 @@+0.9.4.2+-------++- Support GHC-8.6.1+- Add simple smoke test+
postgresql-libpq.cabal view
@@ -1,5 +1,5 @@ Name: postgresql-libpq-Version: 0.9.4.1+Version: 0.9.4.2 Synopsis: low-level binding to libpq Description: This is a binding to libpq: the C application@@ -9,11 +9,11 @@ backend server and to receive the results of these queries. -Homepage: https://github.com/lpsmith/postgresql-libpq+Homepage: https://github.com/phadej/postgresql-libpq License: BSD3 License-file: LICENSE Author: Grant Monroe, Leon P Smith, Joey Adams-Maintainer: Leon P Smith <leon@melding-monads.com>+Maintainer: Oleg Grenrus <oleg.grenrus@iki.fi> Copyright: (c) 2010 Grant Monroe (c) 2011 Leon P Smith Category: Database@@ -29,11 +29,15 @@ GHC==7.10.3, GHC==8.0.2, GHC==8.2.2,- GHC==8.4.1+ GHC==8.4.3,+ GHC==8.6.1 +extra-source-files:+ CHANGELOG.md+ Custom-setup setup-depends:- base >= 4.3 && <5, Cabal >= 1.10 && <2.3+ base >= 4.3 && <5, Cabal >= 1.10 && <2.5 -- If true, use pkg-config, otherwise use the pg_config based build -- configuration@@ -47,19 +51,19 @@ include-dirs: cbits Exposed-modules: Database.PostgreSQL.LibPQ Database.PostgreSQL.LibPQ.Internal- Build-depends: base >= 4.3 && < 5- , bytestring+ Build-depends: base >=4.3 && <4.13+ , bytestring >=0.9.1.0 && <0.11 if !os(windows)- Build-depends: unix+ Build-depends: unix >=2.4.2.0 && <2.8 if os(windows)- Build-depends: Win32-+ Build-depends: Win32 >=2.2.0.2 && <2.7 GHC-Options: -Wall+ if flag(use-pkg-config)- Pkgconfig-depends: libpq+ Pkgconfig-depends: libpq >=9.3 else if os(windows) -- Due to https://sourceware.org/bugzilla/show_bug.cgi?id=22948,@@ -76,11 +80,20 @@ -- Other-modules: Build-tools: hsc2hs +test-suite smoke+ type: exitcode-stdio-1.0+ main-is: Smoke.hs+ hs-source-dirs: test+ build-depends:+ base,+ bytestring,+ postgresql-libpq+ source-repository head type: git- location: https://github.com/lpsmith/postgresql-libpq+ location: https://github.com/phadej/postgresql-libpq source-repository this type: git- location: https://github.com/lpsmith/postgresql-libpq- tag: v0.9.4.1+ location: https://github.com/phadej/postgresql-libpq+ tag: v0.9.4.0
+ test/Smoke.hs view
@@ -0,0 +1,29 @@+module Main (main) where++import Database.PostgreSQL.LibPQ+import System.Environment (getEnvironment)++import qualified Data.ByteString.Char8 as BS8++main :: IO ()+main = do+ env <- getEnvironment+ case lookup "DATABASE_CONNSTRING" env of+ Nothing -> putStrLn "Set DATABASE_CONNSTRING environment variable"+ Just s -> smoke (BS8.pack s)++smoke :: BS8.ByteString -> IO ()+smoke connstring = do+ conn <- connectdb connstring++ -- status functions+ db conn >>= print+ user conn >>= print+ host conn >>= print+ port conn >>= print+ status conn >>= print+ transactionStatus conn >>= print+ protocolVersion conn >>= print+ serverVersion conn >>= print++ finish conn