You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there an existing issue already for this feature request/idea?
I have searched for an existing issue, and could not find anything. I believe this is a new feature request to be evaluated.
What problem is this feature going to solve? Why should it be added?
Postgres is a database that is prone to be extended via plugins and extensions. Would be great to define metrics that will be collected only if certain conditions in the database are verified.
Some scenario where this could be applied:
Extension dependent queries.
Extension version-dependent queries.
Pg flavour dependent queries (new col in the system view, new func added, new system view added etc).
Enabling queries dynamically when a customer installs an optional extension.
Supporting changing the PGD database name since we can detect the extension instead of relying on a pattern matching the DB name.
Metrics that are conditional on runtime state.scenarios
Describe the solution you'd like
Implement a new property along the query that is named predicate_query. This property is used to execute a query in the same context as the one to collect the metrics.
The logic applied should be something like:
predicate_query empty -> true executes the query to collect the metrics.
predicate_query not empty -> execute the query and evaluate the result. Behave accordingly to execute or not the query for the metrics.
Describe alternatives you've considered
Update the query property definition to deliver an array of queries where an error on the first blocks the executions of the next.
Additional context
The need for this feature is also related to an issue with PG that does not allow execution in a single statement of more than one query. Also, using the DO we are not able to get in return a table with a single statement and so we need to end up with something that executes another query to achieve what we need.
Backport?
N/A
Are you willing to actively contribute to this feature?
Yes
Code of Conduct
I agree to follow this project's Code of Conduct
The text was updated successfully, but these errors were encountered:
Is there an existing issue already for this feature request/idea?
What problem is this feature going to solve? Why should it be added?
Postgres is a database that is prone to be extended via plugins and extensions. Would be great to define metrics that will be collected only if certain conditions in the database are verified.
Some scenario where this could be applied:
Describe the solution you'd like
Implement a new property along the
query
that is namedpredicate_query
. This property is used to execute a query in the same context as the one to collect the metrics.The logic applied should be something like:
predicate_query
empty ->true
executes the query to collect the metrics.predicate_query
not empty -> execute the query and evaluate the result. Behave accordingly to execute or not the query for the metrics.Describe alternatives you've considered
Update the
query
property definition to deliver an array of queries where an error on the first blocks the executions of the next.Additional context
The need for this feature is also related to an issue with PG that does not allow execution in a single statement of more than one query. Also, using the
DO
we are not able to get in return a table with a single statement and so we need to end up with something that executes another query to achieve what we need.Backport?
N/A
Are you willing to actively contribute to this feature?
Yes
Code of Conduct
The text was updated successfully, but these errors were encountered: