Rework DefineIndex relkind check
Rework DefineIndex relkind check

Simplify coding using a switch rather than nested if tests.

Author: Álvaro
Reviewed-by: Robert Haas, Amit Langote, Michaël Paquier
Discussion: 6d153578cf96046f6897f6b1bcc560c6b82dc3be@alvherre.pgsql

adam8157/gpdb,xinzweb/gpdb,50wu/gpdb,adam8157/gpdb,lisakowen/gpdb,lisakowen/gpdb,50wu/gpdb,greenplum-db/gpdb,greenplum-db/gpdb,xinzweb/gpdb,greenplum-db/gpdb,xinzweb/gpdb,50wu/gpdb,adam8157/gpdb,lisakowen/gpdb,greenplum-db/gpdb,lisakowen/gpdb,xinzweb/gpdb,greenplum-db/gpdb,xinzweb/gpdb,lisakowen/gpdb,adam8157/gpdb,lisakowen/gpdb,xinzweb/gpdb,50wu/gpdb,greenplum-db/gpdb,lisakowen/gpdb,adam8157/gpdb,adam8157/gpdb,xinzweb/gpdb,greenplum-db/gpdb,50wu/gpdb,adam8157/gpdb,50wu/gpdb,greenplum-db/gpdb,50wu/gpdb,xinzweb/gpdb,lisakowen/gpdb,50wu/gpdb,adam8157/gpdb