File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
src/Database/PostgreSQL/Driver Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ data DataMessage = DataMessage [V.Vector B.ByteString]
50
50
51
51
-- | Parameters of the current connection.
52
52
-- We store only the parameters that cannot change after startup.
53
- -- For more information about additional parameters see documentation.
53
+ -- For more information about additional parameters see PostgreSQL documentation.
54
54
data ConnectionParameters = ConnectionParameters
55
55
{ paramServerVersion :: ServerVersion
56
56
, paramServerEncoding :: B. ByteString -- ^ character set name
@@ -332,3 +332,14 @@ withConnectionMode conn mode handler = do
332
332
where
333
333
ref = connMode conn
334
334
335
+ -- Information about connection
336
+
337
+ getServerVersion :: Connection -> ServerVersion
338
+ getServerVersion = paramServerVersion . connParameters
339
+
340
+ getServerEncoding :: Connection -> B. ByteString
341
+ getServerEncoding = paramServerEncoding . connParameters
342
+
343
+ getIntegerDatetimes :: Connection -> Bool
344
+ getIntegerDatetimes = paramIntegerDatetimes . connParameters
345
+
You can’t perform that action at this time.
0 commit comments