mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-28 19:56:00 +00:00
fix: add missing conditions for pssql parameters query
This commit is contained in:
@@ -13,14 +13,21 @@ SELECT
|
|||||||
ELSE FALSE
|
ELSE FALSE
|
||||||
END AS is_output_parameter
|
END AS is_output_parameter
|
||||||
FROM
|
FROM
|
||||||
information_schema.routines proc
|
information_schema.routines proc
|
||||||
LEFT JOIN
|
LEFT JOIN
|
||||||
information_schema.parameters args
|
information_schema.parameters args
|
||||||
ON proc.specific_schema = args.specific_schema
|
ON proc.specific_schema = args.specific_schema
|
||||||
AND proc.specific_name = args.specific_name
|
AND proc.specific_name = args.specific_name
|
||||||
WHERE
|
WHERE
|
||||||
proc.routine_schema NOT IN ('pg_catalog', 'information_schema') -- Exclude system schemas
|
proc.specific_schema NOT IN ('pg_catalog', 'information_schema') -- Exclude system schemas
|
||||||
AND proc.routine_type IN ('PROCEDURE', 'FUNCTION') -- Filter for procedures
|
AND proc.routine_type IN ('PROCEDURE', 'FUNCTION') -- Filter for procedures
|
||||||
|
AND proc.specific_schema !~ '^_timescaledb_'
|
||||||
|
AND proc.specific_schema =SCHEMA_NAME_CONDITION
|
||||||
|
AND (
|
||||||
|
(routine_type = 'PROCEDURE' AND ('procedures:' || proc.specific_schema || '.' || routine_name) =OBJECT_ID_CONDITION)
|
||||||
|
OR
|
||||||
|
(routine_type = 'FUNCTION' AND ('functions:' || proc.specific_schema || '.' || routine_name) =OBJECT_ID_CONDITION)
|
||||||
|
)
|
||||||
ORDER BY
|
ORDER BY
|
||||||
schema_name,
|
schema_name,
|
||||||
parameter_name,
|
parameter_name,
|
||||||
|
|||||||
Reference in New Issue
Block a user