From 6581663da97ba68b8c27b3c90aa9884e45d78e32 Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Sun, 7 Jul 2024 21:40:54 +0200 Subject: [PATCH] refactor: Remove useless DISTINCT There is already a GROUP BY in the same SELECT. --- src/PostgREST/SchemaCache.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PostgREST/SchemaCache.hs b/src/PostgREST/SchemaCache.hs index b18747a53..6c0c7441b 100644 --- a/src/PostgREST/SchemaCache.hs +++ b/src/PostgREST/SchemaCache.hs @@ -680,7 +680,7 @@ tablesSqlQuery = AND nc.nspname = ANY($$1) ), columns_agg AS ( - SELECT DISTINCT + SELECT info.table_schema AS table_schema, info.table_name AS table_name, array_agg(row(