Refactor/reword some error messages to avoid duplicates

Alvaro Herrera <alvherre@alvh.no-ip.org>

Commit: 2bb969f3998489e5dc4fe9f2a61185b43581975d
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Date: 2024-08-07T15:30:36Z
Releases: 18.0
Refactor/reword some error messages to avoid duplicates

Also, remove brackets around "EMPTY [ ARRAY ]".  An error message is
not the place to state that a keyword is optional.

Backpatch to 17.

Files