fix: not logging explain query for estimated count

Fixes https://github.com/PostgREST/postgrest/issues/4319
This commit is contained in:
steve-chavez
2025-09-15 17:07:12 -05:00
committed by Steve Chavez
parent a75ec75fff
commit 15e04903b1
5 changed files with 71 additions and 47 deletions
+5
View File
@@ -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.