Skip to content

Commit

Permalink
exclude aggregates backward compat
Browse files Browse the repository at this point in the history
  • Loading branch information
djrobstep committed Apr 18, 2020
1 parent 8d1e15b commit a160c99
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 2 additions & 0 deletions schemainspect/pg/obj.py
Original file line number Diff line number Diff line change
Expand Up @@ -893,6 +893,8 @@ def __init__(self, c, include_internal=False):
def processed(q):
if not include_internal:
q = q.replace("-- SKIP_INTERNAL", "")
if self.pg_version >= 11:
q = q.replace("-- 11_AND_LATER", "")
q = text(q)
return q

Expand Down
3 changes: 1 addition & 2 deletions schemainspect/pg/sql/deps.sql
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ with things1 as (
pg_get_function_identity_arguments(oid) as identity_arguments,
'f' as kind
from pg_proc
where
pg_proc.prokind != 'a'
-- 11_AND_LATER where pg_proc.prokind != 'a'
union
select
oid,
Expand Down
4 changes: 2 additions & 2 deletions schemainspect/pg/sql/functions.sql
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ with r1 as (
pg_proc p
INNER JOIN pg_namespace n
ON n.oid=p.pronamespace
where
p.prokind != 'a'
where true
-- 11_AND_LATER and p.prokind != 'a'
-- SKIP_INTERNAL and nspname not in ('pg_internal', 'pg_catalog', 'information_schema', 'pg_toast')
-- SKIP_INTERNAL and nspname not like 'pg_temp_%' and nspname not like 'pg_toast_temp_%'
),
Expand Down

0 comments on commit a160c99

Please sign in to comment.