* Common checks on switching namespaces. * * We complain if either the old or new namespaces is a temporary schema * (or temporary toast schema), or if either the old or new namespaces is the * TOAST schema. */
| 3041 | * TOAST schema. |
| 3042 | */ |
| 3043 | void |
| 3044 | CheckSetNamespace(Oid oldNspOid, Oid nspOid) |
| 3045 | { |
| 3046 | /* disallow renaming into or out of temp schemas */ |
| 3047 | if (isAnyTempNamespace(nspOid) || isAnyTempNamespace(oldNspOid)) |
| 3048 | ereport(ERROR, |
| 3049 | (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), |
| 3050 | errmsg("cannot move objects into or out of temporary schemas"))); |
| 3051 | |
| 3052 | /* same for TOAST schema */ |
| 3053 | if (nspOid == PG_TOAST_NAMESPACE || oldNspOid == PG_TOAST_NAMESPACE) |
| 3054 | ereport(ERROR, |
| 3055 | (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), |
| 3056 | errmsg("cannot move objects into or out of TOAST schema"))); |
| 3057 | |
| 3058 | /* same for AO SEGMENT schema */ |
| 3059 | if (nspOid == PG_AOSEGMENT_NAMESPACE || oldNspOid == PG_AOSEGMENT_NAMESPACE) |
| 3060 | ereport(ERROR, |
| 3061 | (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), |
| 3062 | errmsg("cannot move objects into or out of AO SEGMENT schema"))); |
| 3063 | |
| 3064 | /* same for EXT AUX schema */ |
| 3065 | if (nspOid == PG_EXTAUX_NAMESPACE || oldNspOid == PG_EXTAUX_NAMESPACE) |
| 3066 | ereport(ERROR, |
| 3067 | (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), |
| 3068 | errmsg("cannot move objects into or out of namespace pg_ext_aux"))); |
| 3069 | } |
| 3070 | |
| 3071 | /* |
| 3072 | * QualifiedNameGetCreationNamespace |
no test coverage detected