Skip to content

Commit 82ae355

Browse files
committed
chore: fix functions
1 parent ae4798e commit 82ae355

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

src/lib/sql/functions.sql.ts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,12 @@ with functions as (
3535
${props.idsFilter ? `p.oid ${props.idsFilter} AND` : ''}
3636
${props.nameFilter ? `p.proname ${props.nameFilter} AND` : ''}
3737
${
38-
props.args && props.args.length > 0
39-
? `p.proargtypes::text = ${
40-
props.args.length
41-
? `(
38+
props.args === undefined
39+
? ''
40+
: props.args.length > 0
41+
? `p.proargtypes::text = ${
42+
props.args.length
43+
? `(
4244
SELECT STRING_AGG(type_oid::text, ' ') FROM (
4345
SELECT (
4446
split_args.arr[
@@ -57,9 +59,9 @@ with functions as (
5759
) AS split_args
5860
) args
5961
)`
60-
: "''"
61-
} AND`
62-
: ''
62+
: "''"
63+
} AND`
64+
: ''
6365
}
6466
p.prokind = 'f'
6567
)

src/lib/sql/version.sql.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,4 @@ SELECT
99
pg_stat_activity
1010
) AS active_connections,
1111
current_setting('max_connections') :: int8 AS max_connections
12-
1312
`

0 commit comments

Comments
 (0)