Hello community,

here is the log from the commit of package ghc-postgresql-libpq for 
openSUSE:Factory checked in at 2016-11-02 12:47:16
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-postgresql-libpq (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-postgresql-libpq.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-postgresql-libpq"

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/ghc-postgresql-libpq/ghc-postgresql-libpq.changes    
    2016-10-22 13:17:48.000000000 +0200
+++ 
/work/SRC/openSUSE:Factory/.ghc-postgresql-libpq.new/ghc-postgresql-libpq.changes
   2016-11-02 12:47:18.000000000 +0100
@@ -1,0 +2,5 @@
+Thu Sep 15 06:57:49 UTC 2016 - [email protected]
+
+- Update to version 0.9.2.0 revision 0 with cabal2obs.
+
+-------------------------------------------------------------------

Old:
----
  postgresql-libpq-0.9.1.1.tar.gz

New:
----
  postgresql-libpq-0.9.2.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ghc-postgresql-libpq.spec ++++++
--- /var/tmp/diff_new_pack.pyqfIS/_old  2016-11-02 12:47:19.000000000 +0100
+++ /var/tmp/diff_new_pack.pyqfIS/_new  2016-11-02 12:47:19.000000000 +0100
@@ -18,20 +18,18 @@
 
 %global pkg_name postgresql-libpq
 Name:           ghc-%{pkg_name}
-Version:        0.9.1.1
+Version:        0.9.2.0
 Release:        0
 Summary:        Low-level binding to libpq
 License:        BSD-3-Clause
-Group:          System/Libraries
+Group:          Development/Languages/Other
 Url:            https://hackage.haskell.org/package/%{pkg_name}
 Source0:        
https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz
 BuildRequires:  ghc-Cabal-devel
-# Begin cabal-rpm deps:
 BuildRequires:  ghc-bytestring-devel
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  postgresql94-devel
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
-# End cabal-rpm deps
 
 %description
 This is a binding to libpq: the C application programmer's interface to
@@ -44,11 +42,9 @@
 Group:          Development/Libraries/Other
 Requires:       %{name} = %{version}-%{release}
 Requires:       ghc-compiler = %{ghc_version}
-# Begin cabal-rpm deps:
 Requires:       postgresql94-devel
 Requires(post): ghc-compiler = %{ghc_version}
 Requires(postun): ghc-compiler = %{ghc_version}
-# End cabal-rpm deps
 
 %description devel
 This package provides the Haskell %{pkg_name} library development
@@ -57,15 +53,12 @@
 %prep
 %setup -q -n %{pkg_name}-%{version}
 
-
 %build
 %ghc_lib_build
 
-
 %install
 %ghc_lib_install
 
-
 %post devel
 %ghc_pkg_recache
 

++++++ postgresql-libpq-0.9.1.1.tar.gz -> postgresql-libpq-0.9.2.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/postgresql-libpq-0.9.1.1/cbits/noticehandlers.c 
new/postgresql-libpq-0.9.2.0/cbits/noticehandlers.c
--- old/postgresql-libpq-0.9.1.1/cbits/noticehandlers.c 2015-07-27 
22:36:52.000000000 +0200
+++ new/postgresql-libpq-0.9.2.0/cbits/noticehandlers.c 2016-08-25 
22:35:33.000000000 +0200
@@ -56,4 +56,5 @@
     free(x);
     x = nx;
   }
+  free(arg);
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/postgresql-libpq-0.9.1.1/postgresql-libpq.cabal 
new/postgresql-libpq-0.9.2.0/postgresql-libpq.cabal
--- old/postgresql-libpq-0.9.1.1/postgresql-libpq.cabal 2015-07-27 
22:36:52.000000000 +0200
+++ new/postgresql-libpq-0.9.2.0/postgresql-libpq.cabal 2016-08-25 
22:35:33.000000000 +0200
@@ -1,5 +1,5 @@
 Name:                postgresql-libpq
-Version:             0.9.1.1
+Version:             0.9.2.0
 Synopsis:            low-level binding to libpq
 
 Description:         This is a binding to libpq: the C application
@@ -32,7 +32,7 @@
   c-sources:           cbits/noticehandlers.c
   include-dirs:        cbits
   Exposed-modules:     Database.PostgreSQL.LibPQ
-
+                       Database.PostgreSQL.LibPQ.Internal
   Build-depends:       base >= 4 && < 5
                      , bytestring
 
@@ -54,4 +54,4 @@
 source-repository this
   type:     git
   location: http://github.com/lpsmith/postgresql-libpq
-  tag:      v0.9.1.1
+  tag:      v0.9.2.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/postgresql-libpq-0.9.1.1/src/Database/PostgreSQL/LibPQ/Internal.hs 
new/postgresql-libpq-0.9.2.0/src/Database/PostgreSQL/LibPQ/Internal.hs
--- old/postgresql-libpq-0.9.1.1/src/Database/PostgreSQL/LibPQ/Internal.hs      
1970-01-01 01:00:00.000000000 +0100
+++ new/postgresql-libpq-0.9.2.0/src/Database/PostgreSQL/LibPQ/Internal.hs      
2016-08-25 22:35:33.000000000 +0200
@@ -0,0 +1,39 @@
+-----------------------------------------------------------------------------
+-- |
+-- Module      :  Database.PostgreSQL.LibPQ.Internal
+-- Copyright   :  (c) 2010 Grant Monroe,
+--                (c) 2011 Leon P Smith
+-- License     :  BSD3
+--
+-- This module exports the data constructor for the database connection
+-- object so that people may create their own foreign bindings to libpq
+-- functions that may not exist yet in vanilla postgresql-libpq.
+--
+-----------------------------------------------------------------------------
+
+{-# LANGUAGE BangPatterns, EmptyDataDecls #-}
+
+module Database.PostgreSQL.LibPQ.Internal where
+
+import Foreign
+import Control.Concurrent.MVar ( MVar )
+
+
+-- | 'Connection' encapsulates a connection to the backend.
+data Connection = Conn {-# UNPACK #-} !(ForeignPtr PGconn)
+                       {-# UNPACK #-} !(MVar NoticeBuffer)
+
+instance Eq Connection where
+    (Conn c _) == (Conn d _) = c == d
+    (Conn c _) /= (Conn d _) = c /= d
+
+withConn :: Connection
+         -> (Ptr PGconn -> IO b)
+         -> IO b
+withConn (Conn !fp _) f = withForeignPtr fp f
+{-# INLINE withConn #-}
+
+data PGconn
+
+data CNoticeBuffer
+type NoticeBuffer = Ptr CNoticeBuffer
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/postgresql-libpq-0.9.1.1/src/Database/PostgreSQL/LibPQ.hsc 
new/postgresql-libpq-0.9.2.0/src/Database/PostgreSQL/LibPQ.hsc
--- old/postgresql-libpq-0.9.1.1/src/Database/PostgreSQL/LibPQ.hsc      
2015-07-27 22:36:52.000000000 +0200
+++ new/postgresql-libpq-0.9.2.0/src/Database/PostgreSQL/LibPQ.hsc      
2016-08-25 22:35:33.000000000 +0200
@@ -165,6 +165,7 @@
     , isBusy
     , setnonblocking
     , isnonblocking
+    , setSingleRowMode
     , FlushStatus(..)
     , flush
 
@@ -244,6 +245,8 @@
 
 import Data.Typeable
 
+import Database.PostgreSQL.LibPQ.Internal
+
 #if __GLASGOW_HASKELL__ >= 700
 import Control.Exception (mask_)
 #else
@@ -261,16 +264,6 @@
 -- whether a connection was successfully made before queries are sent
 -- via the connection object.
 
--- | 'Connection' encapsulates a connection to the backend.
-data Connection = Conn {-# UNPACK #-} !(ForeignPtr PGconn)
-                       {-# UNPACK #-} !(MVar NoticeBuffer)
-
-instance Eq Connection where
-    (Conn c _) == (Conn d _) = c == d
-    (Conn c _) /= (Conn d _) = c /= d
-
-data PGconn
-
 -- | Makes a new connection to the database server.
 --
 -- This function opens a new database connection using the parameters
@@ -972,6 +965,10 @@
                 | NonfatalError -- ^ A nonfatal error (a notice or
                                 -- warning) occurred.
                 | FatalError    -- ^ A fatal error occurred.
+                | SingleTuple   -- ^ The PGresult contains a single result 
tuple
+                                -- from the current command. This status occurs
+                                -- only when single-row mode has been selected
+                                -- for the query.
                   deriving (Eq, Show)
 
 instance Enum ExecStatus where
@@ -983,6 +980,7 @@
     toEnum (#const PGRES_BAD_RESPONSE)   = BadResponse
     toEnum (#const PGRES_NONFATAL_ERROR) = NonfatalError
     toEnum (#const PGRES_FATAL_ERROR)    = FatalError
+    toEnum (#const PGRES_SINGLE_TUPLE)   = SingleTuple
     toEnum _ = error "Database.PQ.Enum.ExecStatus.toEnum: bad argument"
 
     fromEnum EmptyQuery    = (#const PGRES_EMPTY_QUERY)
@@ -993,6 +991,7 @@
     fromEnum BadResponse   = (#const PGRES_BAD_RESPONSE)
     fromEnum NonfatalError = (#const PGRES_NONFATAL_ERROR)
     fromEnum FatalError    = (#const PGRES_FATAL_ERROR)
+    fromEnum SingleTuple   = (#const PGRES_SINGLE_TUPLE)
 
 -- | Returns the result status of the command.
 resultStatus :: Result
@@ -1807,6 +1806,19 @@
 isnonblocking connection = enumFromConn connection c_PQisnonblocking
 
 
+-- | Select single-row mode for the currently-executing query.
+--
+-- This function can only be called immediately after PQsendQuery or one of its
+-- sibling functions, before any other operation on the connection such as
+-- PQconsumeInput or PQgetResult. If called at the correct time, the function
+-- activates single-row mode for the current query and returns 1. Otherwise the
+-- mode stays unchanged and the function returns 0. In any case, the mode
+-- reverts to normal after completion of the current query.
+setSingleRowMode :: Connection
+                 -> IO Bool
+setSingleRowMode connection = enumFromConn connection c_PQsetSingleRowMode
+
+
 data FlushStatus = FlushOk
                  | FlushFailed
                  | FlushWriting
@@ -2001,12 +2013,6 @@
     enumFromConn connection $ \p ->
         c_PQsetErrorVerbosity p $ fromIntegral $ fromEnum verbosity
 
-withConn :: Connection
-         -> (Ptr PGconn -> IO b)
-         -> IO b
-withConn (Conn !fp _) f = withForeignPtr fp f
-
-
 enumFromConn :: (Integral a, Enum b) => Connection
              -> (Ptr PGconn -> IO a)
              -> IO b
@@ -2086,9 +2092,6 @@
 --     where
 --       finalizer = touchForeignPtr fp
 
-data CNoticeBuffer
-type NoticeBuffer = Ptr CNoticeBuffer
-
 type NoticeReceiver = NoticeBuffer -> Ptr PGresult -> IO ()
 
 data PGnotice
@@ -2477,6 +2480,9 @@
 foreign import ccall unsafe "libpq-fe.h PQisnonblocking"
     c_PQisnonblocking :: Ptr PGconn -> IO CInt
 
+foreign import ccall unsafe "libpq-fe.h PQsetSingleRowMode"
+    c_PQsetSingleRowMode :: Ptr PGconn -> IO CInt
+
 foreign import ccall        "libpq-fe.h PQgetResult"
     c_PQgetResult :: Ptr PGconn -> IO (Ptr PGresult)
 


Reply via email to