perf: no caching for prefer timezone
`Prefer: timezone` no longer requires the schema cache. Previously this required caching `pg_timezone_names` which was slow in some systems. Closes https://github.com/PostgREST/postgrest/issues/5100 and https://github.com/PostgREST/postgrest/issues/4751.
This commit is contained in:
committed by
Steve Chavez
parent
a41396c425
commit
932c4f6328
@@ -7,7 +7,6 @@ module PostgREST.Config.Database
|
||||
, queryRoleSettings
|
||||
, RoleSettings
|
||||
, RoleIsolationLvl
|
||||
, TimezoneNames
|
||||
, toIsolationLevel
|
||||
) where
|
||||
|
||||
@@ -31,7 +30,6 @@ import Protolude
|
||||
|
||||
type RoleSettings = (HM.HashMap ByteString (HM.HashMap ByteString ByteString))
|
||||
type RoleIsolationLvl = HM.HashMap ByteString SQL.IsolationLevel
|
||||
type TimezoneNames = Set Text -- cache timezone names for prefer timezone=
|
||||
|
||||
toIsolationLevel :: Text -> SQL.IsolationLevel
|
||||
toIsolationLevel a = case T.toLower a of
|
||||
|
||||
Reference in New Issue
Block a user