Tighten up relation kind checks for extended statistics

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

Commit: 8c5cdb7f4f6e1d6a6104cb58ce4f23453891651b
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Date: 2017-04-17T20:55:55Z
Releases: 10.0
Tighten up relation kind checks for extended statistics

We were accepting creation of extended statistics only for regular
tables, but they can usefully be created for foreign tables, partitioned
tables, and materialized views, too.  Allow those cases.

While at it, make sure all the rejected cases throw a consistent error
message, and add regression tests for the whole thing.

Author: David Rowley, Álvaro Herrera
Discussion: https://postgr.es/m/CAKJS1f-BmGo410bh5RSPZUvOO0LhmHL2NYmdrC_Jm8pk_FfyCA@mail.gmail.com

Files

Documentation touched

Discussion