/* *WeshouldapplyRLS.However,theusermayturnofftherow_security *GUCtogetaforcederrorinstead.
*/ if (!row_security && !noError)
ereport(ERROR,
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
errmsg("query would be affected by row-level security policy for table \"%s\"",
get_rel_name(relid)),
amowner ? errhint("To disable the policy for the table's owner, use ALTER TABLE NO FORCE ROW LEVEL SECURITY.") : 0));
/* RLS should be fully enabled for this relation. */ return RLS_ENABLED;
}
/* *row_security_active * *check_enable_rlswrappedasaSQLcallablefunctionexcept *RLS_NONE_ENVandRLS_NONEarethesameforthispurpose.
*/
Datum
row_security_active(PG_FUNCTION_ARGS)
{ /* By OID */
Oid tableoid = PG_GETARG_OID(0); int rls_status;
Datum
row_security_active_name(PG_FUNCTION_ARGS)
{ /* By qualified name */
text *tablename = PG_GETARG_TEXT_PP(0);
RangeVar *tablerel;
Oid tableoid; int rls_status;
/* Look up table name. Can't lock it - we might not have privileges. */
tablerel = makeRangeVarFromNameList(textToQualifiedNameList(tablename));
tableoid = RangeVarGetRelid(tablerel, NoLock, false);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.