Skip to content

Commit

Permalink
refactor: Simplify schemaDescription query
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfgangwalther committed Jul 8, 2024
1 parent 785ae4f commit 2df6cc2
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/PostgREST/SchemaCache.hs
Original file line number Diff line number Diff line change
Expand Up @@ -471,14 +471,7 @@ schemaDescription :: Bool -> SQL.Statement Schema (Maybe Text)
schemaDescription =
SQL.Statement sql (param HE.text) (join <$> HD.rowMaybe (nullableColumn HD.text))
where
sql = encodeUtf8 [trimming|
select
description
from
pg_namespace n
left join pg_description d on d.objoid = n.oid
where
n.oid = $$1::regnamespace |]
sql = "SELECT pg_catalog.obj_description($1::regnamespace, 'pg_namespace')"

accessibleTables :: Bool -> SQL.Statement [Schema] AccessSet
accessibleTables =
Expand Down

0 comments on commit 2df6cc2

Please sign in to comment.