PostgreSQL Source Code git master
pg_class.c File Reference
#include "postgres.h"
#include "catalog/pg_class.h"
Include dependency graph for pg_class.c:

Go to the source code of this file.

Functions

int errdetail_relkind_not_supported (char relkind)
 

Function Documentation

◆ errdetail_relkind_not_supported()

int errdetail_relkind_not_supported ( char  relkind)

Definition at line 24 of file pg_class.c.

25{
26 switch (relkind)
27 {
28 case RELKIND_RELATION:
29 return errdetail("This operation is not supported for tables.");
30 case RELKIND_INDEX:
31 return errdetail("This operation is not supported for indexes.");
32 case RELKIND_SEQUENCE:
33 return errdetail("This operation is not supported for sequences.");
34 case RELKIND_TOASTVALUE:
35 return errdetail("This operation is not supported for TOAST tables.");
36 case RELKIND_VIEW:
37 return errdetail("This operation is not supported for views.");
38 case RELKIND_MATVIEW:
39 return errdetail("This operation is not supported for materialized views.");
40 case RELKIND_COMPOSITE_TYPE:
41 return errdetail("This operation is not supported for composite types.");
42 case RELKIND_FOREIGN_TABLE:
43 return errdetail("This operation is not supported for foreign tables.");
44 case RELKIND_PARTITIONED_TABLE:
45 return errdetail("This operation is not supported for partitioned tables.");
46 case RELKIND_PARTITIONED_INDEX:
47 return errdetail("This operation is not supported for partitioned indexes.");
48 default:
49 elog(ERROR, "unrecognized relkind: '%c'", relkind);
50 return 0;
51 }
52}
int errdetail(const char *fmt,...)
Definition: elog.c:1203
#define ERROR
Definition: elog.h:39
#define elog(elevel,...)
Definition: elog.h:225

References elog, errdetail(), and ERROR.

Referenced by ATExecChangeOwner(), ATExecSetRelOptions(), ATSimplePermissions(), check_publication_add_relation(), check_relation_relkind(), CheckSubscriptionRelkind(), CommentObject(), CreateStatistics(), CreateTriggerFiringOn(), DefineIndex(), DefineQueryRewrite(), ExecSecLabelStmt(), get_raw_page_internal(), get_relation_info(), heap_force_common(), make_modifytable(), pg_relpages_impl(), pgstat_relation(), pgstattuple_approx_internal(), process_owned_by(), RangeVarCallbackForLockTable(), RangeVarCallbackForRenameRule(), RangeVarCallbackForRenameTrigger(), RemoveTriggerById(), renameatt_check(), stats_lock_check_privileges(), transformMergeStmt(), transformTableLikeClause(), validate_relation_kind(), and verify_heapam().