# array_nulls

> array_nulls — Enables input of NULL elements in arrays. Observed in PG9.0–19 Beta 3; its last measured boot default is on in PG19 Beta 3, with user context. This is a beta-snapshot fact and can change before PostgreSQL 19 GA.
---

> [!NOTE]
> **Fact — official short description:** “Enables input of NULL elements in arrays.”

## Identity {#identity}

| Field | Value | Meaning |
| --- | --- | --- |
| Type | `bool` | Upstream pg_settings type |
| Context | `user` | Settable by an ordinary user |
| Unit | — | Raw unit |
| Range | — | Raw limits in the last observed version |
| Enum values | — | — for non-enum types |
| Category | Version and Platform Compatibility / Previous PostgreSQL Versions | Upstream classification |
| Latest boot value | `on` | on |
{.fields meta="-"}

## Lifecycle {#lifecycle}

| Fact | Value |
| --- | --- |
| First observed | PG9.0 (research boundary) |
| Present in | PG9.0–19 Beta 3 |
| Removed in | No |
| Introduction commit | Not asserted: predates the PG9.0 research boundary |
| Commit date | — |
| Discussion | — |

## Default history {#default-history}

| Versions | Raw `boot_val` | Unit | Human value |
| --- | --- | --- | --- |
| PG9.0–19 Beta 3 | `on` | — | on |
{.full-width caption="Measured PG9.0–19 Beta 3 boot defaults"}

## How it works {#mechanism}

Enables input of NULL elements in arrays. It can be changed at session scope, so different sessions may observe different behavior.

With the normal on value, an unquoted NULL token in an array input denotes a SQL null element; quoting it denotes the text 'NULL'. The off value restores pre-8.2 input behavior and exists only for migration of legacy clients.

Monitor and change array_nulls together with backslash_quote, escape_string_warning, standard_conforming_strings. Validate on the relevant server role and real workload, then use its user context to choose session change, reload, or restart; a historical boot default is not the current effective value.

## Tuning advice {#tuning-advice}

> [!TIP]
> **Advice.** These are workload-specific starting points and must be validated with measurements.

| Workload | Guidance |
| --- | --- |
| OLTP | Keep the modern default and repair legacy clients/SQL that depend on array_nulls. Test migration at session scope first; do not make a compatibility switch permanent cluster policy. |
| OLAP | Regression-test ETL, generated SQL, and old drivers, where parsing/quoting assumptions hide. Performance is rarely a reason to change this switch. |
| Small nodes | Keep the default without a legacy requirement. If temporarily enabled, record owner, affected connections, and a removal date. |
{.full-width}

## Pigsty {#pigsty}

Values use the fixed 8-vCPU, 32-GiB, 100-GiB SSD fixture and render the current Pigsty templates for PG19 Beta 3; this does not assert current Pigsty support for that historical or beta release.

| Template | Effective value | Versus upstream boot | Source expression |
| --- | --- | --- | --- |
| OLTP | Unmodified | — | — |
| OLAP | Unmodified | — | — |
| CRIT | Unmodified | — | — |
| TINY | Unmodified | — | — |
{.full-width}

> [!CAUTION]
> **Advice — pending human review.** Fact from the current Pigsty template projection: OLTP: PG9.0–19 Beta 3 unmodified; OLAP: PG9.0–19 Beta 3 unmodified; CRIT: PG9.0–19 Beta 3 unmodified; TINY: PG9.0–19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.

## Common pitfalls {#common-pitfalls}

- Keeping a compatibility switch permanently instead of fixing the client.
- Testing in one session and deploying globally to unrelated applications.
- Confusing parsing compatibility with data or security compatibility.
- Forgetting to remove an override after the upgrade migration is complete.

## Related parameters {#related-parameters}

[`backslash_quote`](/parameters/backslash-quote/) · [`escape_string_warning`](/parameters/escape-string-warning/) · [`standard_conforming_strings`](/parameters/standard-conforming-strings/) · [`transform_null_equals`](/parameters/transform-null-equals/) · [`quote_all_identifiers`](/parameters/quote-all-identifiers/) · [`default_with_oids`](/parameters/default-with-oids/)

## References {#references}

- [PostgreSQL 19 Beta 3 — array_nulls](https://www.postgresql.org/docs/19/runtime-config-compatible.html#GUC-ARRAY-NULLS)
- [PostgreSQL 19 release notes](https://www.postgresql.org/docs/19/release-19.html)
- [Machine-readable GUC export](/data/guc.jsonl)
