[1.5.x] Fixed #20168 - Generalized a PostgreSQL specific database query in the docs.

Thanks Russ for the suggestion.

Backport of c119d0f152 from master