Fix fatal error on postgres unsupported version, also fix #577 format of supported version

This commit is contained in:
SteveBash
2016-10-29 13:38:19 -05:00
parent d78ef56314
commit 4064a7b984
3 changed files with 15 additions and 6 deletions
+9 -2
View File
@@ -16,6 +16,7 @@ module PostgREST.Config ( prettyVersion
, readOptions
, corsPolicy
, minimumPgVersion
, PgVersion (..)
, AppConfig (..)
)
where
@@ -171,6 +172,12 @@ argParser = CmdArgs <$>
help "Path to configuration file")) <*>
switch (long "example-config" <> help "output an example config file")
data PgVersion = PgVersion {
pgvNum :: Int32
, pgvName :: Text
}
-- | Tells the minimum PostgreSQL version required by this version of PostgREST
minimumPgVersion :: Integer
minimumPgVersion = 90300
minimumPgVersion :: PgVersion
minimumPgVersion = PgVersion 90300 "9.3"