From 7e8e9a9529748251b8e663656acaaf9a77c26677 Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Sat, 22 Jun 2024 19:44:39 +0200 Subject: [PATCH] refactor: Fix some spelling mistakes in comments and whitespace --- src/PostgREST/SchemaCache.hs | 4 ++-- test/io/big_schema.sql | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/PostgREST/SchemaCache.hs b/src/PostgREST/SchemaCache.hs index 39716d913..12f2e07bc 100644 --- a/src/PostgREST/SchemaCache.hs +++ b/src/PostgREST/SchemaCache.hs @@ -414,7 +414,7 @@ funcsSqlQuery = encodeUtf8 [trimming| WHEN 'character'::regtype THEN 'character varying' WHEN 'character[]'::regtype THEN 'character varying[]' ELSE type::regtype::text - END, -- convert types that ignore the lenth and accept any value till maximum size + END, -- convert types that ignore the length and accept any value till maximum size idx <= (pronargs - pronargdefaults), -- is_required COALESCE(mode = 'v', FALSE) -- is_variadic ) ORDER BY idx) AS args, @@ -1113,7 +1113,7 @@ allViewsKeyDependencies = join pg_class tbl on tbl.oid = rep.resorigtbl join pg_attribute col on col.attrelid = tbl.oid and col.attnum = rep.resorigcol join pg_namespace sch on sch.oid = tbl.relnamespace - group by sch.nspname, tbl.relname, rep.view_schema, rep.view_name, pks_fks.conname, pks_fks.contype, pks_fks.ncol + group by sch.nspname, tbl.relname, rep.view_schema, rep.view_name, pks_fks.conname, pks_fks.contype, pks_fks.ncol -- make sure we only return key for which all columns are referenced in the view - no partial PKs or FKs having ncol = array_length(array_agg(row(col.attname, view_columns) order by pks_fks.ord), 1) |] diff --git a/test/io/big_schema.sql b/test/io/big_schema.sql index 4b3afb3e0..ea56c5123 100644 --- a/test/io/big_schema.sql +++ b/test/io/big_schema.sql @@ -3,7 +3,7 @@ This is a 2018 version of the apflora schema https://github.com/barbalex/apf2/tr We use it to test our metadata generation because it contains a good amount of db objects. -Custom roles and privileges where removed. +Custom roles and privileges were removed. postgrest-with-postgresql-14 -f test/io/big_schema.sql psql