Skip to content

Commit

Permalink
fix: Provide valid syntax for PostgreSQL queries (#1282)
Browse files Browse the repository at this point in the history
* Update postgresql.md

Signed-off-by: Manish Kumar Mourya <135261699+M4nihere@users.noreply.github.com>

* Update postgresql.md

Signed-off-by: Manish Kumar Mourya <135261699+M4nihere@users.noreply.github.com>

* PostgreSQL Scaler Correct Command

Signed-off-by: Mani <mani@Manis-MacBook-Pro.local>

---------

Signed-off-by: Manish Kumar Mourya <135261699+M4nihere@users.noreply.github.com>
Signed-off-by: Mani <mani@Manis-MacBook-Pro.local>
Co-authored-by: Mani <mani@Manis-MacBook-Pro.local>
  • Loading branch information
M4nihere and Mani authored Mar 8, 2024
1 parent 4952a9d commit 900a3fe
Show file tree
Hide file tree
Showing 17 changed files with 51 additions and 51 deletions.
6 changes: 3 additions & 3 deletions content/docs/1.4/scalers/postgresql.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ triggers:
- type: postgresql
metadata:
connection: AIRFLOW_CONN_AIRFLOW_DB
query: "SELECT ceil(COUNT(*)::decimal / 16) FROM task_instance WHERE state='running' OR state='queued'"
query: "SELECT ceil(COUNT(*)::decimal / 16) FROM task_instance WHERE state='running' OR state='queued';"
targetQueryValue: 1
```
Expand All @@ -57,7 +57,7 @@ triggers:
port: "5432"
dbName: postgresql
sslmode: disable
query: "SELECT ceil(COUNT(*)::decimal / 16) FROM task_instance WHERE state='running' OR state='queued'"
query: "SELECT ceil(COUNT(*)::decimal / 16) FROM task_instance WHERE state='running' OR state='queued';"
targetQueryValue: 1
```
Expand Down Expand Up @@ -90,6 +90,6 @@ spec:
- type: postgresql
metadata:
connection: AIRFLOW_CONN_AIRFLOW_DB
query: "SELECT ceil(COUNT(*)::decimal / 16) FROM task_instance WHERE state='running' OR state='queued'"
query: "SELECT ceil(COUNT(*)::decimal / 16) FROM task_instance WHERE state='running' OR state='queued';"
targetQueryValue: 1
```
6 changes: 3 additions & 3 deletions content/docs/1.5/scalers/postgresql.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ triggers:
- type: postgresql
metadata:
connection: AIRFLOW_CONN_AIRFLOW_DB
query: "SELECT ceil(COUNT(*)::decimal / 16) FROM task_instance WHERE state='running' OR state='queued'"
query: "SELECT ceil(COUNT(*)::decimal / 16) FROM task_instance WHERE state='running' OR state='queued';"
targetQueryValue: 1
```
Expand All @@ -57,7 +57,7 @@ triggers:
port: "5432"
dbName: postgresql
sslmode: disable
query: "SELECT ceil(COUNT(*)::decimal / 16) FROM task_instance WHERE state='running' OR state='queued'"
query: "SELECT ceil(COUNT(*)::decimal / 16) FROM task_instance WHERE state='running' OR state='queued';"
targetQueryValue: 1
```
Expand Down Expand Up @@ -90,6 +90,6 @@ spec:
- type: postgresql
metadata:
connection: AIRFLOW_CONN_AIRFLOW_DB
query: "SELECT ceil(COUNT(*)::decimal / 16) FROM task_instance WHERE state='running' OR state='queued'"
query: "SELECT ceil(COUNT(*)::decimal / 16) FROM task_instance WHERE state='running' OR state='queued';"
targetQueryValue: 1
```
6 changes: 3 additions & 3 deletions content/docs/2.0/scalers/postgresql.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ triggers:
- type: postgresql
metadata:
connectionFromEnv: AIRFLOW_CONN_AIRFLOW_DB
query: "SELECT ceil(COUNT(*)::decimal / 16) FROM task_instance WHERE state='running' OR state='queued'"
query: "SELECT ceil(COUNT(*)::decimal / 16) FROM task_instance WHERE state='running' OR state='queued';"
targetQueryValue: 1
```
Expand All @@ -55,7 +55,7 @@ triggers:
port: "5432"
dbName: postgresql
sslmode: disable
query: "SELECT ceil(COUNT(*)::decimal / 16) FROM task_instance WHERE state='running' OR state='queued'"
query: "SELECT ceil(COUNT(*)::decimal / 16) FROM task_instance WHERE state='running' OR state='queued';"
targetQueryValue: 1
```
Expand Down Expand Up @@ -88,6 +88,6 @@ spec:
- type: postgresql
metadata:
connectionFromEnv: AIRFLOW_CONN_AIRFLOW_DB
query: "SELECT ceil(COUNT(*)::decimal / 16) FROM task_instance WHERE state='running' OR state='queued'"
query: "SELECT ceil(COUNT(*)::decimal / 16) FROM task_instance WHERE state='running' OR state='queued';"
targetQueryValue: 1
```
6 changes: 3 additions & 3 deletions content/docs/2.1/scalers/postgresql.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ triggers:
- type: postgresql
metadata:
connectionFromEnv: AIRFLOW_CONN_AIRFLOW_DB
query: "SELECT ceil(COUNT(*)::decimal / 16) FROM task_instance WHERE state='running' OR state='queued'"
query: "SELECT ceil(COUNT(*)::decimal / 16) FROM task_instance WHERE state='running' OR state='queued';"
targetQueryValue: 1
metricName: backlog_process_count #optional. Generated value would be `postgresql-postgresql---test@localhost`
```
Expand All @@ -59,7 +59,7 @@ triggers:
port: "5432"
dbName: test_db_name
sslmode: disable
query: "SELECT ceil(COUNT(*)::decimal / 16) FROM task_instance WHERE state='running' OR state='queued'"
query: "SELECT ceil(COUNT(*)::decimal / 16) FROM task_instance WHERE state='running' OR state='queued';"
targetQueryValue: 1
metricName: backlog_process_count #optional. Generated value would be `postgresql-test_db_name`
```
Expand Down Expand Up @@ -93,6 +93,6 @@ spec:
- type: postgresql
metadata:
connectionFromEnv: AIRFLOW_CONN_AIRFLOW_DB
query: "SELECT ceil(COUNT(*)::decimal / 16) FROM task_instance WHERE state='running' OR state='queued'"
query: "SELECT ceil(COUNT(*)::decimal / 16) FROM task_instance WHERE state='running' OR state='queued';"
targetQueryValue: 1
```
6 changes: 3 additions & 3 deletions content/docs/2.10/scalers/postgresql.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ triggers:
- type: postgresql
metadata:
connectionFromEnv: AIRFLOW_CONN_AIRFLOW_DB
query: "SELECT ceil(COUNT(*)::decimal / 16) FROM task_instance WHERE state='running' OR state='queued'"
query: "SELECT ceil(COUNT(*)::decimal / 16) FROM task_instance WHERE state='running' OR state='queued';"
targetQueryValue: "1.1"
activationTargetQueryValue: "5"
metricName: backlog_process_count # DEPRECATED: This parameter is deprecated as of KEDA v2.10 and will be removed in version 2.12. optional. Generated value would be `postgresql-postgresql---test@localhost`
Expand All @@ -61,7 +61,7 @@ triggers:
port: "5432"
dbName: test_db_name
sslmode: disable
query: "SELECT ceil(COUNT(*)::decimal / 16) FROM task_instance WHERE state='running' OR state='queued'"
query: "SELECT ceil(COUNT(*)::decimal / 16) FROM task_instance WHERE state='running' OR state='queued';"
targetQueryValue: "2.2"
metricName: backlog_process_count # DEPRECATED: This parameter is deprecated as of KEDA v2.10 and will be removed in version `2.12`. optional. Generated value would be `postgresql-test_db_name`
```
Expand Down Expand Up @@ -100,6 +100,6 @@ spec:
- type: postgresql
metadata:
connectionFromEnv: AIRFLOW_CONN_AIRFLOW_DB
query: "SELECT ceil(COUNT(*)::decimal / 16) FROM task_instance WHERE state='running' OR state='queued'"
query: "SELECT ceil(COUNT(*)::decimal / 16) FROM task_instance WHERE state='running' OR state='queued';"
targetQueryValue: 1
```
6 changes: 3 additions & 3 deletions content/docs/2.11/scalers/postgresql.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ triggers:
- type: postgresql
metadata:
connectionFromEnv: AIRFLOW_CONN_AIRFLOW_DB
query: "SELECT ceil(COUNT(*)::decimal / 16) FROM task_instance WHERE state='running' OR state='queued'"
query: "SELECT ceil(COUNT(*)::decimal / 16) FROM task_instance WHERE state='running' OR state='queued';"
targetQueryValue: "1.1"
activationTargetQueryValue: "5"
metricName: backlog_process_count # DEPRECATED: This parameter is deprecated as of KEDA v2.10 and will be removed in version 2.12. optional. Generated value would be `postgresql-postgresql---test@localhost`
Expand All @@ -61,7 +61,7 @@ triggers:
port: "5432"
dbName: test_db_name
sslmode: disable
query: "SELECT ceil(COUNT(*)::decimal / 16) FROM task_instance WHERE state='running' OR state='queued'"
query: "SELECT ceil(COUNT(*)::decimal / 16) FROM task_instance WHERE state='running' OR state='queued';"
targetQueryValue: "2.2"
metricName: backlog_process_count # DEPRECATED: This parameter is deprecated as of KEDA v2.10 and will be removed in version `2.12`. optional. Generated value would be `postgresql-test_db_name`
```
Expand Down Expand Up @@ -100,6 +100,6 @@ spec:
- type: postgresql
metadata:
connectionFromEnv: AIRFLOW_CONN_AIRFLOW_DB
query: "SELECT ceil(COUNT(*)::decimal / 16) FROM task_instance WHERE state='running' OR state='queued'"
query: "SELECT ceil(COUNT(*)::decimal / 16) FROM task_instance WHERE state='running' OR state='queued';"
targetQueryValue: 1
```
6 changes: 3 additions & 3 deletions content/docs/2.12/scalers/postgresql.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ triggers:
- type: postgresql
metadata:
connectionFromEnv: AIRFLOW_CONN_AIRFLOW_DB
query: "SELECT ceil(COUNT(*)::decimal / 16) FROM task_instance WHERE state='running' OR state='queued'"
query: "SELECT ceil(COUNT(*)::decimal / 16) FROM task_instance WHERE state='running' OR state='queued';"
targetQueryValue: "1.1"
activationTargetQueryValue: "5"
```
Expand All @@ -59,7 +59,7 @@ triggers:
port: "5432"
dbName: test_db_name
sslmode: disable
query: "SELECT ceil(COUNT(*)::decimal / 16) FROM task_instance WHERE state='running' OR state='queued'"
query: "SELECT ceil(COUNT(*)::decimal / 16) FROM task_instance WHERE state='running' OR state='queued';"
targetQueryValue: "2.2"
```
Expand Down Expand Up @@ -97,6 +97,6 @@ spec:
- type: postgresql
metadata:
connectionFromEnv: AIRFLOW_CONN_AIRFLOW_DB
query: "SELECT ceil(COUNT(*)::decimal / 16) FROM task_instance WHERE state='running' OR state='queued'"
query: "SELECT ceil(COUNT(*)::decimal / 16) FROM task_instance WHERE state='running' OR state='queued';"
targetQueryValue: 1
```
6 changes: 3 additions & 3 deletions content/docs/2.13/scalers/postgresql.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ triggers:
- type: postgresql
metadata:
connectionFromEnv: AIRFLOW_CONN_AIRFLOW_DB
query: "SELECT ceil(COUNT(*)::decimal / 16) FROM task_instance WHERE state='running' OR state='queued'"
query: "SELECT ceil(COUNT(*)::decimal / 16) FROM task_instance WHERE state='running' OR state='queued';"
targetQueryValue: "1.1"
activationTargetQueryValue: "5"
```
Expand All @@ -59,7 +59,7 @@ triggers:
port: "5432"
dbName: test_db_name
sslmode: disable
query: "SELECT ceil(COUNT(*)::decimal / 16) FROM task_instance WHERE state='running' OR state='queued'"
query: "SELECT ceil(COUNT(*)::decimal / 16) FROM task_instance WHERE state='running' OR state='queued';"
targetQueryValue: "2.2"
```
Expand Down Expand Up @@ -97,6 +97,6 @@ spec:
- type: postgresql
metadata:
connectionFromEnv: AIRFLOW_CONN_AIRFLOW_DB
query: "SELECT ceil(COUNT(*)::decimal / 16) FROM task_instance WHERE state='running' OR state='queued'"
query: "SELECT ceil(COUNT(*)::decimal / 16) FROM task_instance WHERE state='running' OR state='queued';"
targetQueryValue: 1
```
6 changes: 3 additions & 3 deletions content/docs/2.14/scalers/postgresql.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ triggers:
- type: postgresql
metadata:
connectionFromEnv: AIRFLOW_CONN_AIRFLOW_DB
query: "SELECT ceil(COUNT(*)::decimal / 16) FROM task_instance WHERE state='running' OR state='queued'"
query: "SELECT ceil(COUNT(*)::decimal / 16) FROM task_instance WHERE state='running' OR state='queued';"
targetQueryValue: "1.1"
activationTargetQueryValue: "5"
```
Expand All @@ -59,7 +59,7 @@ triggers:
port: "5432"
dbName: test_db_name
sslmode: disable
query: "SELECT ceil(COUNT(*)::decimal / 16) FROM task_instance WHERE state='running' OR state='queued'"
query: "SELECT ceil(COUNT(*)::decimal / 16) FROM task_instance WHERE state='running' OR state='queued';"
targetQueryValue: "2.2"
```
Expand Down Expand Up @@ -97,6 +97,6 @@ spec:
- type: postgresql
metadata:
connectionFromEnv: AIRFLOW_CONN_AIRFLOW_DB
query: "SELECT ceil(COUNT(*)::decimal / 16) FROM task_instance WHERE state='running' OR state='queued'"
query: "SELECT ceil(COUNT(*)::decimal / 16) FROM task_instance WHERE state='running' OR state='queued';"
targetQueryValue: 1
```
6 changes: 3 additions & 3 deletions content/docs/2.2/scalers/postgresql.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ triggers:
- type: postgresql
metadata:
connectionFromEnv: AIRFLOW_CONN_AIRFLOW_DB
query: "SELECT ceil(COUNT(*)::decimal / 16) FROM task_instance WHERE state='running' OR state='queued'"
query: "SELECT ceil(COUNT(*)::decimal / 16) FROM task_instance WHERE state='running' OR state='queued';"
targetQueryValue: 1
metricName: backlog_process_count #optional. Generated value would be `postgresql-postgresql---test@localhost`
```
Expand All @@ -59,7 +59,7 @@ triggers:
port: "5432"
dbName: test_db_name
sslmode: disable
query: "SELECT ceil(COUNT(*)::decimal / 16) FROM task_instance WHERE state='running' OR state='queued'"
query: "SELECT ceil(COUNT(*)::decimal / 16) FROM task_instance WHERE state='running' OR state='queued';"
targetQueryValue: 1
metricName: backlog_process_count #optional. Generated value would be `postgresql-test_db_name`
```
Expand Down Expand Up @@ -93,6 +93,6 @@ spec:
- type: postgresql
metadata:
connectionFromEnv: AIRFLOW_CONN_AIRFLOW_DB
query: "SELECT ceil(COUNT(*)::decimal / 16) FROM task_instance WHERE state='running' OR state='queued'"
query: "SELECT ceil(COUNT(*)::decimal / 16) FROM task_instance WHERE state='running' OR state='queued';"
targetQueryValue: 1
```
6 changes: 3 additions & 3 deletions content/docs/2.3/scalers/postgresql.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ triggers:
- type: postgresql
metadata:
connectionFromEnv: AIRFLOW_CONN_AIRFLOW_DB
query: "SELECT ceil(COUNT(*)::decimal / 16) FROM task_instance WHERE state='running' OR state='queued'"
query: "SELECT ceil(COUNT(*)::decimal / 16) FROM task_instance WHERE state='running' OR state='queued';"
targetQueryValue: 1
metricName: backlog_process_count #optional. Generated value would be `postgresql-postgresql---test@localhost`
```
Expand All @@ -59,7 +59,7 @@ triggers:
port: "5432"
dbName: test_db_name
sslmode: disable
query: "SELECT ceil(COUNT(*)::decimal / 16) FROM task_instance WHERE state='running' OR state='queued'"
query: "SELECT ceil(COUNT(*)::decimal / 16) FROM task_instance WHERE state='running' OR state='queued';"
targetQueryValue: 1
metricName: backlog_process_count #optional. Generated value would be `postgresql-test_db_name`
```
Expand Down Expand Up @@ -93,6 +93,6 @@ spec:
- type: postgresql
metadata:
connectionFromEnv: AIRFLOW_CONN_AIRFLOW_DB
query: "SELECT ceil(COUNT(*)::decimal / 16) FROM task_instance WHERE state='running' OR state='queued'"
query: "SELECT ceil(COUNT(*)::decimal / 16) FROM task_instance WHERE state='running' OR state='queued';"
targetQueryValue: 1
```
6 changes: 3 additions & 3 deletions content/docs/2.4/scalers/postgresql.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ triggers:
- type: postgresql
metadata:
connectionFromEnv: AIRFLOW_CONN_AIRFLOW_DB
query: "SELECT ceil(COUNT(*)::decimal / 16) FROM task_instance WHERE state='running' OR state='queued'"
query: "SELECT ceil(COUNT(*)::decimal / 16) FROM task_instance WHERE state='running' OR state='queued';"
targetQueryValue: 1
metricName: backlog_process_count #optional. Generated value would be `postgresql-postgresql---test@localhost`
```
Expand All @@ -59,7 +59,7 @@ triggers:
port: "5432"
dbName: test_db_name
sslmode: disable
query: "SELECT ceil(COUNT(*)::decimal / 16) FROM task_instance WHERE state='running' OR state='queued'"
query: "SELECT ceil(COUNT(*)::decimal / 16) FROM task_instance WHERE state='running' OR state='queued';"
targetQueryValue: 1
metricName: backlog_process_count #optional. Generated value would be `postgresql-test_db_name`
```
Expand Down Expand Up @@ -93,6 +93,6 @@ spec:
- type: postgresql
metadata:
connectionFromEnv: AIRFLOW_CONN_AIRFLOW_DB
query: "SELECT ceil(COUNT(*)::decimal / 16) FROM task_instance WHERE state='running' OR state='queued'"
query: "SELECT ceil(COUNT(*)::decimal / 16) FROM task_instance WHERE state='running' OR state='queued';"
targetQueryValue: 1
```
6 changes: 3 additions & 3 deletions content/docs/2.5/scalers/postgresql.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ triggers:
- type: postgresql
metadata:
connectionFromEnv: AIRFLOW_CONN_AIRFLOW_DB
query: "SELECT ceil(COUNT(*)::decimal / 16) FROM task_instance WHERE state='running' OR state='queued'"
query: "SELECT ceil(COUNT(*)::decimal / 16) FROM task_instance WHERE state='running' OR state='queued';"
targetQueryValue: 1
metricName: backlog_process_count #optional. Generated value would be `postgresql-postgresql---test@localhost`
```
Expand All @@ -59,7 +59,7 @@ triggers:
port: "5432"
dbName: test_db_name
sslmode: disable
query: "SELECT ceil(COUNT(*)::decimal / 16) FROM task_instance WHERE state='running' OR state='queued'"
query: "SELECT ceil(COUNT(*)::decimal / 16) FROM task_instance WHERE state='running' OR state='queued';"
targetQueryValue: 1
metricName: backlog_process_count #optional. Generated value would be `postgresql-test_db_name`
```
Expand Down Expand Up @@ -98,6 +98,6 @@ spec:
- type: postgresql
metadata:
connectionFromEnv: AIRFLOW_CONN_AIRFLOW_DB
query: "SELECT ceil(COUNT(*)::decimal / 16) FROM task_instance WHERE state='running' OR state='queued'"
query: "SELECT ceil(COUNT(*)::decimal / 16) FROM task_instance WHERE state='running' OR state='queued';"
targetQueryValue: 1
```
6 changes: 3 additions & 3 deletions content/docs/2.6/scalers/postgresql.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ triggers:
- type: postgresql
metadata:
connectionFromEnv: AIRFLOW_CONN_AIRFLOW_DB
query: "SELECT ceil(COUNT(*)::decimal / 16) FROM task_instance WHERE state='running' OR state='queued'"
query: "SELECT ceil(COUNT(*)::decimal / 16) FROM task_instance WHERE state='running' OR state='queued';"
targetQueryValue: 1
metricName: backlog_process_count #optional. Generated value would be `postgresql-postgresql---test@localhost`
```
Expand All @@ -59,7 +59,7 @@ triggers:
port: "5432"
dbName: test_db_name
sslmode: disable
query: "SELECT ceil(COUNT(*)::decimal / 16) FROM task_instance WHERE state='running' OR state='queued'"
query: "SELECT ceil(COUNT(*)::decimal / 16) FROM task_instance WHERE state='running' OR state='queued';"
targetQueryValue: 1
metricName: backlog_process_count #optional. Generated value would be `postgresql-test_db_name`
```
Expand Down Expand Up @@ -98,6 +98,6 @@ spec:
- type: postgresql
metadata:
connectionFromEnv: AIRFLOW_CONN_AIRFLOW_DB
query: "SELECT ceil(COUNT(*)::decimal / 16) FROM task_instance WHERE state='running' OR state='queued'"
query: "SELECT ceil(COUNT(*)::decimal / 16) FROM task_instance WHERE state='running' OR state='queued';"
targetQueryValue: 1
```
6 changes: 3 additions & 3 deletions content/docs/2.7/scalers/postgresql.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ triggers:
- type: postgresql
metadata:
connectionFromEnv: AIRFLOW_CONN_AIRFLOW_DB
query: "SELECT ceil(COUNT(*)::decimal / 16) FROM task_instance WHERE state='running' OR state='queued'"
query: "SELECT ceil(COUNT(*)::decimal / 16) FROM task_instance WHERE state='running' OR state='queued';"
targetQueryValue: 1
metricName: backlog_process_count #optional. Generated value would be `postgresql-postgresql---test@localhost`
```
Expand All @@ -59,7 +59,7 @@ triggers:
port: "5432"
dbName: test_db_name
sslmode: disable
query: "SELECT ceil(COUNT(*)::decimal / 16) FROM task_instance WHERE state='running' OR state='queued'"
query: "SELECT ceil(COUNT(*)::decimal / 16) FROM task_instance WHERE state='running' OR state='queued';"
targetQueryValue: 1
metricName: backlog_process_count #optional. Generated value would be `postgresql-test_db_name`
```
Expand Down Expand Up @@ -98,6 +98,6 @@ spec:
- type: postgresql
metadata:
connectionFromEnv: AIRFLOW_CONN_AIRFLOW_DB
query: "SELECT ceil(COUNT(*)::decimal / 16) FROM task_instance WHERE state='running' OR state='queued'"
query: "SELECT ceil(COUNT(*)::decimal / 16) FROM task_instance WHERE state='running' OR state='queued';"
targetQueryValue: 1
```
Loading

0 comments on commit 900a3fe

Please sign in to comment.