Skip to content

Commit

Permalink
Document map subscript behavior for non-existent keys
Browse files Browse the repository at this point in the history
  • Loading branch information
yassan authored and ebyhr committed Apr 3, 2024
1 parent 8d3d6d4 commit 5d91660
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docs/src/main/sphinx/functions/map.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

## Subscript operator: \[\]

The `[]` operator is used to retrieve the value corresponding to a given key from a map:
The `[]` operator is used to retrieve the value corresponding to a given key from a map.
This operator throws an error if the key is not contained in the map.
See also `element_at` function that returns `NULL` in such case.

```
SELECT name_to_age_map['Bob'] AS bob_age;
Expand Down

0 comments on commit 5d91660

Please sign in to comment.