Improve the error message for an inappropriate column definition list.
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 22 Sep 2020 14:49:11 +0000 (10:49 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 22 Sep 2020 14:49:11 +0000 (10:49 -0400)
commitce90f075f0d831ca4085ba73891b7da2a2f7047e
tree19008cdd70128f1a418ec326444eb876168c7245
parentf859c2ffa01d83a079652ce7d953cd61eb3d7171
Improve the error message for an inappropriate column definition list.

The existing message about "a column definition list is only allowed for
functions returning "record"" could be given in some cases where it was
fairly confusing; in particular, a function with multiple OUT parameters
*does* return record according to pg_proc.  Break it down into a couple
more cases to deliver a more on-point complaint.  Per complaint from
Bruce Momjian.

Discussion: https://postgr.es/m/798909.1600562993@sss.pgh.pa.us
src/backend/parser/parse_relation.c
src/test/regress/expected/rangefuncs.out
src/test/regress/sql/rangefuncs.sql