Skip to content

Commit

Permalink
update postgres docs for nulls and coalesce (#1393)
Browse files Browse the repository at this point in the history
Signed-off-by: Rob Pickerill <r.pickerill@gmail.com>
  • Loading branch information
robpickerill authored May 20, 2024
1 parent 5056907 commit 461a16d
Show file tree
Hide file tree
Showing 18 changed files with 38 additions and 0 deletions.
2 changes: 2 additions & 0 deletions content/docs/1.4/scalers/postgresql.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ Finally, a user inserts a query that returns the desired value.
- `query` - What query to poll postgresql with. Query must return an integer.
- `targetQueryValue` - A threshold that is used as `targetAverageValue` in HPA.

> Note that the query must return a single integer value. If the query has a possibility of returning `null`, a default value can be set using the `COALESCE` function. For example, `SELECT COALESCE(column_name, 0) FROM table_name;`. See [PostgreSQL documentation](https://www.postgresql.org/docs/current/functions-conditional.html#FUNCTIONS-COALESCE-NVL-IFNULL) for more information on the `COALESCE` function.
This is an example of using a full connection string:

```yaml
Expand Down
2 changes: 2 additions & 0 deletions content/docs/1.5/scalers/postgresql.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ Finally, a user inserts a query that returns the desired value.
- `query` - What query to poll postgresql with. Query must return an integer.
- `targetQueryValue` - A threshold that is used as `targetAverageValue` in HPA.

> Note that the query must return a single integer value. If the query has a possibility of returning `null`, a default value can be set using the `COALESCE` function. For example, `SELECT COALESCE(column_name, 0) FROM table_name;`. See [PostgreSQL documentation](https://www.postgresql.org/docs/current/functions-conditional.html#FUNCTIONS-COALESCE-NVL-IFNULL) for more information on the `COALESCE` function.
This is an example of using a full connection string:

```yaml
Expand Down
2 changes: 2 additions & 0 deletions content/docs/2.0/scalers/postgresql.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ Finally, a user inserts a query that returns the desired value.
- `query` - What query to poll postgresql with. Query must return an integer.
- `targetQueryValue` - A threshold that is used as `targetAverageValue` in HPA.

> Note that the query must return a single integer value. If the query has a possibility of returning `null`, a default value can be set using the `COALESCE` function. For example, `SELECT COALESCE(column_name, 0) FROM table_name;`. See [PostgreSQL documentation](https://www.postgresql.org/docs/current/functions-conditional.html#FUNCTIONS-COALESCE-NVL-IFNULL) for more information on the `COALESCE` function.
This is an example of using a full connection string:

```yaml
Expand Down
2 changes: 2 additions & 0 deletions content/docs/2.1/scalers/postgresql.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ Finally, a user inserts a query that returns the desired value.
- `targetQueryValue` - A threshold that is used as `targetAverageValue` in HPA.
- `metricName` - Name to assign to the metric. If not set KEDA will generate a name based on either the connection string if set or the db name. If using more than one trigger it is required that all metricNames be unique. (Optional)

> Note that the query must return a single integer value. If the query has a possibility of returning `null`, a default value can be set using the `COALESCE` function. For example, `SELECT COALESCE(column_name, 0) FROM table_name;`. See [PostgreSQL documentation](https://www.postgresql.org/docs/current/functions-conditional.html#FUNCTIONS-COALESCE-NVL-IFNULL) for more information on the `COALESCE` function.
This is an example of using a full connection string with `AIRFLOW_CONN_AIRFLOW_DB` set as `postgresql://test@localhost`:

```yaml
Expand Down
2 changes: 2 additions & 0 deletions content/docs/2.10/scalers/postgresql.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ Finally, a user inserts a query that returns the desired value.
- `activationTargetQueryValue` - Target value for activating the scaler. Learn more about activation [here](./../concepts/scaling-deployments.md#activating-and-scaling-thresholds).(Default: `0`, Optional, This value can be a float)
- `metricName` - Name to assign to the metric. If not set KEDA will generate a name based on either the connection string if set or the db name. If using more than one trigger it is required that all metricNames be unique. (DEPRECATED: This parameter is deprecated as of KEDA v2.10 and will be removed in version `2.12`)

> Note that the query must return a single integer value. If the query has a possibility of returning `null`, a default value can be set using the `COALESCE` function. For example, `SELECT COALESCE(column_name, 0) FROM table_name;`. See [PostgreSQL documentation](https://www.postgresql.org/docs/current/functions-conditional.html#FUNCTIONS-COALESCE-NVL-IFNULL) for more information on the `COALESCE` function.
This is an example of using a full connection string with `AIRFLOW_CONN_AIRFLOW_DB` set as `postgresql://test@localhost`:

```yaml
Expand Down
2 changes: 2 additions & 0 deletions content/docs/2.11/scalers/postgresql.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ Finally, a user inserts a query that returns the desired value.
- `activationTargetQueryValue` - Target value for activating the scaler. Learn more about activation [here](./../concepts/scaling-deployments.md#activating-and-scaling-thresholds).(Default: `0`, Optional, This value can be a float)
- `metricName` - Name to assign to the metric. If not set KEDA will generate a name based on either the connection string if set or the db name. If using more than one trigger it is required that all metricNames be unique. (DEPRECATED: This parameter is deprecated as of KEDA v2.10 and will be removed in version `2.12`)

> Note that the query must return a single integer value. If the query has a possibility of returning `null`, a default value can be set using the `COALESCE` function. For example, `SELECT COALESCE(column_name, 0) FROM table_name;`. See [PostgreSQL documentation](https://www.postgresql.org/docs/current/functions-conditional.html#FUNCTIONS-COALESCE-NVL-IFNULL) for more information on the `COALESCE` function.
This is an example of using a full connection string with `AIRFLOW_CONN_AIRFLOW_DB` set as `postgresql://test@localhost`:

```yaml
Expand Down
2 changes: 2 additions & 0 deletions content/docs/2.12/scalers/postgresql.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ Finally, a user inserts a query that returns the desired value.

This is an example of using a full connection string with `AIRFLOW_CONN_AIRFLOW_DB` set as `postgresql://test@localhost`:

> Note that the query must return a single integer value. If the query has a possibility of returning `null`, a default value can be set using the `COALESCE` function. For example, `SELECT COALESCE(column_name, 0) FROM table_name;`. See [PostgreSQL documentation](https://www.postgresql.org/docs/current/functions-conditional.html#FUNCTIONS-COALESCE-NVL-IFNULL) for more information on the `COALESCE` function.
```yaml
triggers:
- type: postgresql
Expand Down
2 changes: 2 additions & 0 deletions content/docs/2.13/scalers/postgresql.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ Finally, a user inserts a query that returns the desired value.
- `targetQueryValue` - A threshold that is used as `targetValue` or `targetAverageValue` (depending on the trigger metric type) in HPA. (This value can be a float)
- `activationTargetQueryValue` - Target value for activating the scaler. Learn more about activation [here](./../concepts/scaling-deployments.md#activating-and-scaling-thresholds).(Default: `0`, Optional, This value can be a float)

> Note that the query must return a single integer value. If the query has a possibility of returning `null`, a default value can be set using the `COALESCE` function. For example, `SELECT COALESCE(column_name, 0) FROM table_name;`. See [PostgreSQL documentation](https://www.postgresql.org/docs/current/functions-conditional.html#FUNCTIONS-COALESCE-NVL-IFNULL) for more information on the `COALESCE` function.
This is an example of using a full connection string with `AIRFLOW_CONN_AIRFLOW_DB` set as `postgresql://test@localhost`:

```yaml
Expand Down
2 changes: 2 additions & 0 deletions content/docs/2.14/scalers/postgresql.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ Finally, a user inserts a query that returns the desired value.
- `targetQueryValue` - A threshold that is used as `targetValue` or `targetAverageValue` (depending on the trigger metric type) in HPA. (This value can be a float)
- `activationTargetQueryValue` - Target value for activating the scaler. Learn more about activation [here](./../concepts/scaling-deployments.md#activating-and-scaling-thresholds).(Default: `0`, Optional, This value can be a float)

> Note that the query must return a single integer value. If the query has a possibility of returning `null`, a default value can be set using the `COALESCE` function. For example, `SELECT COALESCE(column_name, 0) FROM table_name;`. See [PostgreSQL documentation](https://www.postgresql.org/docs/current/functions-conditional.html#FUNCTIONS-COALESCE-NVL-IFNULL) for more information on the `COALESCE` function.
This is an example of using a full connection string with `AIRFLOW_CONN_AIRFLOW_DB` set as `postgresql://test@localhost`:

```yaml
Expand Down
4 changes: 4 additions & 0 deletions content/docs/2.15/scalers/postgresql.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ Finally, a user inserts a query that returns the desired value.
- `targetQueryValue` - A threshold that is used as `targetValue` or `targetAverageValue` (depending on the trigger metric type) in HPA. (This value can be a float)
- `activationTargetQueryValue` - Target value for activating the scaler. Learn more about activation [here](./../concepts/scaling-deployments.md#activating-and-scaling-thresholds).(Default: `0`, Optional, This value can be a float)


> Note that the query must return a single integer value. If the query has a possibility of returning `null`, a default value can be set using the `COALESCE` function. For example, `SELECT COALESCE(column_name, 0) FROM table_name;`. See [PostgreSQL documentation](https://www.postgresql.org/docs/current/functions-conditional.html#FUNCTIONS-COALESCE-NVL-IFNULL) for more information on the `COALESCE` function.

This is an example of using a full connection string with `AIRFLOW_CONN_AIRFLOW_DB` set as `postgresql://test@localhost`:

```yaml
Expand Down
2 changes: 2 additions & 0 deletions content/docs/2.2/scalers/postgresql.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ Finally, a user inserts a query that returns the desired value.
- `targetQueryValue` - A threshold that is used as `targetAverageValue` in HPA.
- `metricName` - Name to assign to the metric. If not set KEDA will generate a name based on either the connection string if set or the db name. If using more than one trigger it is required that all metricNames be unique. (Optional)

> Note that the query must return a single integer value. If the query has a possibility of returning `null`, a default value can be set using the `COALESCE` function. For example, `SELECT COALESCE(column_name, 0) FROM table_name;`. See [PostgreSQL documentation](https://www.postgresql.org/docs/current/functions-conditional.html#FUNCTIONS-COALESCE-NVL-IFNULL) for more information on the `COALESCE` function.
This is an example of using a full connection string with `AIRFLOW_CONN_AIRFLOW_DB` set as `postgresql://test@localhost`:

```yaml
Expand Down
2 changes: 2 additions & 0 deletions content/docs/2.3/scalers/postgresql.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ Finally, a user inserts a query that returns the desired value.
- `targetQueryValue` - A threshold that is used as `targetAverageValue` in HPA.
- `metricName` - Name to assign to the metric. If not set KEDA will generate a name based on either the connection string if set or the db name. If using more than one trigger it is required that all metricNames be unique. (Optional)

> Note that the query must return a single integer value. If the query has a possibility of returning `null`, a default value can be set using the `COALESCE` function. For example, `SELECT COALESCE(column_name, 0) FROM table_name;`. See [PostgreSQL documentation](https://www.postgresql.org/docs/current/functions-conditional.html#FUNCTIONS-COALESCE-NVL-IFNULL) for more information on the `COALESCE` function.
This is an example of using a full connection string with `AIRFLOW_CONN_AIRFLOW_DB` set as `postgresql://test@localhost`:

```yaml
Expand Down
2 changes: 2 additions & 0 deletions content/docs/2.4/scalers/postgresql.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ Finally, a user inserts a query that returns the desired value.
- `targetQueryValue` - A threshold that is used as `targetAverageValue` in HPA.
- `metricName` - Name to assign to the metric. If not set KEDA will generate a name based on either the connection string if set or the db name. If using more than one trigger it is required that all metricNames be unique. (Optional)

> Note that the query must return a single integer value. If the query has a possibility of returning `null`, a default value can be set using the `COALESCE` function. For example, `SELECT COALESCE(column_name, 0) FROM table_name;`. See [PostgreSQL documentation](https://www.postgresql.org/docs/current/functions-conditional.html#FUNCTIONS-COALESCE-NVL-IFNULL) for more information on the `COALESCE` function.
This is an example of using a full connection string with `AIRFLOW_CONN_AIRFLOW_DB` set as `postgresql://test@localhost`:

```yaml
Expand Down
2 changes: 2 additions & 0 deletions content/docs/2.5/scalers/postgresql.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ Finally, a user inserts a query that returns the desired value.
- `targetQueryValue` - A threshold that is used as `targetAverageValue` in HPA.
- `metricName` - Name to assign to the metric. If not set KEDA will generate a name based on either the connection string if set or the db name. If using more than one trigger it is required that all metricNames be unique. (Optional)

> Note that the query must return a single integer value. If the query has a possibility of returning `null`, a default value can be set using the `COALESCE` function. For example, `SELECT COALESCE(column_name, 0) FROM table_name;`. See [PostgreSQL documentation](https://www.postgresql.org/docs/current/functions-conditional.html#FUNCTIONS-COALESCE-NVL-IFNULL) for more information on the `COALESCE` function.
This is an example of using a full connection string with `AIRFLOW_CONN_AIRFLOW_DB` set as `postgresql://test@localhost`:

```yaml
Expand Down
2 changes: 2 additions & 0 deletions content/docs/2.6/scalers/postgresql.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ Finally, a user inserts a query that returns the desired value.
- `targetQueryValue` - A threshold that is used as `targetAverageValue` in HPA.
- `metricName` - Name to assign to the metric. If not set KEDA will generate a name based on either the connection string if set or the db name. If using more than one trigger it is required that all metricNames be unique. (Optional)

> Note that the query must return a single integer value. If the query has a possibility of returning `null`, a default value can be set using the `COALESCE` function. For example, `SELECT COALESCE(column_name, 0) FROM table_name;`. See [PostgreSQL documentation](https://www.postgresql.org/docs/current/functions-conditional.html#FUNCTIONS-COALESCE-NVL-IFNULL) for more information on the `COALESCE` function.
This is an example of using a full connection string with `AIRFLOW_CONN_AIRFLOW_DB` set as `postgresql://test@localhost`:

```yaml
Expand Down
2 changes: 2 additions & 0 deletions content/docs/2.7/scalers/postgresql.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ Finally, a user inserts a query that returns the desired value.
- `targetQueryValue` - A threshold that is used as `targetValue` or `targetAverageValue` (depending on the trigger metric type) in HPA.
- `metricName` - Name to assign to the metric. If not set KEDA will generate a name based on either the connection string if set or the db name. If using more than one trigger it is required that all metricNames be unique. (Optional)

> Note that the query must return a single integer value. If the query has a possibility of returning `null`, a default value can be set using the `COALESCE` function. For example, `SELECT COALESCE(column_name, 0) FROM table_name;`. See [PostgreSQL documentation](https://www.postgresql.org/docs/current/functions-conditional.html#FUNCTIONS-COALESCE-NVL-IFNULL) for more information on the `COALESCE` function.
This is an example of using a full connection string with `AIRFLOW_CONN_AIRFLOW_DB` set as `postgresql://test@localhost`:

```yaml
Expand Down
2 changes: 2 additions & 0 deletions content/docs/2.8/scalers/postgresql.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ Finally, a user inserts a query that returns the desired value.
- `activationTargetQueryValue` - Target value for activating the scaler. Learn more about activation [here](./../concepts/scaling-deployments.md#activating-and-scaling-thresholds).(Default: `0`, Optional, This value can be a float)
- `metricName` - Name to assign to the metric. If not set KEDA will generate a name based on either the connection string if set or the db name. If using more than one trigger it is required that all metricNames be unique. (Optional)

> Note that the query must return a single integer value. If the query has a possibility of returning `null`, a default value can be set using the `COALESCE` function. For example, `SELECT COALESCE(column_name, 0) FROM table_name;`. See [PostgreSQL documentation](https://www.postgresql.org/docs/current/functions-conditional.html#FUNCTIONS-COALESCE-NVL-IFNULL) for more information on the `COALESCE` function.
This is an example of using a full connection string with `AIRFLOW_CONN_AIRFLOW_DB` set as `postgresql://test@localhost`:

```yaml
Expand Down
2 changes: 2 additions & 0 deletions content/docs/2.9/scalers/postgresql.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ Finally, a user inserts a query that returns the desired value.
- `activationTargetQueryValue` - Target value for activating the scaler. Learn more about activation [here](./../concepts/scaling-deployments.md#activating-and-scaling-thresholds).(Default: `0`, Optional, This value can be a float)
- `metricName` - Name to assign to the metric. If not set KEDA will generate a name based on either the connection string if set or the db name. If using more than one trigger it is required that all metricNames be unique. (Optional)

> Note that the query must return a single integer value. If the query has a possibility of returning `null`, a default value can be set using the `COALESCE` function. For example, `SELECT COALESCE(column_name, 0) FROM table_name;`. See [PostgreSQL documentation](https://www.postgresql.org/docs/current/functions-conditional.html#FUNCTIONS-COALESCE-NVL-IFNULL) for more information on the `COALESCE` function.
This is an example of using a full connection string with `AIRFLOW_CONN_AIRFLOW_DB` set as `postgresql://test@localhost`:

```yaml
Expand Down

0 comments on commit 461a16d

Please sign in to comment.