fix: not logging explain query for estimated count
Fixes https://github.com/PostgREST/postgrest/issues/4319
This commit is contained in:
committed by
Steve Chavez
parent
a75ec75fff
commit
15e04903b1
@@ -19,6 +19,7 @@ module PostgREST.ApiRequest.Preferences
|
||||
, PreferMaxAffected(..)
|
||||
, fromHeaders
|
||||
, shouldCount
|
||||
, shouldExplainCount
|
||||
, prefAppliedHeader
|
||||
) where
|
||||
|
||||
@@ -238,6 +239,10 @@ shouldCount :: Maybe PreferCount -> Bool
|
||||
shouldCount prefCount =
|
||||
prefCount == Just ExactCount || prefCount == Just EstimatedCount
|
||||
|
||||
shouldExplainCount :: Maybe PreferCount -> Bool
|
||||
shouldExplainCount prefCount =
|
||||
prefCount == Just PlannedCount || prefCount == Just EstimatedCount
|
||||
|
||||
-- | Whether to commit or roll back transactions.
|
||||
data PreferTransaction
|
||||
= Commit -- ^ Commit transaction - the default.
|
||||
|
||||
Reference in New Issue
Block a user