Skip to content

Commit 5d91660

Browse files
yassanebyhr
authored andcommitted
Document map subscript behavior for non-existent keys
1 parent 8d3d6d4 commit 5d91660

File tree

1 file changed

+3
-1
lines changed
  • docs/src/main/sphinx/functions

1 file changed

+3
-1
lines changed

docs/src/main/sphinx/functions/map.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22

33
## Subscript operator: \[\]
44

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

79
```
810
SELECT name_to_age_map['Bob'] AS bob_age;

0 commit comments

Comments
 (0)