mirror of
https://github.com/postgres/postgres.git
synced 2025-10-25 13:17:41 +03:00
The changed routines are mostly those that can be directly called by
ProcessUtilitySlow; the intention is to make the affected object
information more precise, in support for future event trigger changes.
Originally it was envisioned that the OID of the affected object would
be enough, and in most cases that is correct, but upon actually
implementing the event trigger changes it turned out that ObjectAddress
is more widely useful.
Additionally, some command execution routines grew an output argument
that's an object address which provides further info about the executed
command. To wit:
* for ALTER DOMAIN / ADD CONSTRAINT, it corresponds to the address of
the new constraint
* for ALTER OBJECT / SET SCHEMA, it corresponds to the address of the
schema that originally contained the object.
* for ALTER EXTENSION {ADD, DROP} OBJECT, it corresponds to the address
of the object added to or dropped from the extension.
There's no user-visible change in this commit, and no functional change
either.
Discussion: 20150218213255.GC6717@tamriel.snowman.net
Reviewed-By: Stephen Frost, Andres Freund
35 lines
979 B
C
35 lines
979 B
C
/*
|
|
* seclabel.h
|
|
*
|
|
* Prototypes for functions in commands/seclabel.c
|
|
*
|
|
* Portions Copyright (c) 1996-2015, PostgreSQL Global Development Group
|
|
* Portions Copyright (c) 1994, Regents of the University of California
|
|
*/
|
|
#ifndef SECLABEL_H
|
|
#define SECLABEL_H
|
|
|
|
#include "catalog/objectaddress.h"
|
|
|
|
/*
|
|
* Internal APIs
|
|
*/
|
|
extern char *GetSecurityLabel(const ObjectAddress *object,
|
|
const char *provider);
|
|
extern void SetSecurityLabel(const ObjectAddress *object,
|
|
const char *provider, const char *label);
|
|
extern void DeleteSecurityLabel(const ObjectAddress *object);
|
|
extern void DeleteSharedSecurityLabel(Oid objectId, Oid classId);
|
|
|
|
/*
|
|
* Statement and ESP hook support
|
|
*/
|
|
extern ObjectAddress ExecSecLabelStmt(SecLabelStmt *stmt);
|
|
|
|
typedef void (*check_object_relabel_type) (const ObjectAddress *object,
|
|
const char *seclabel);
|
|
extern void register_label_provider(const char *provider,
|
|
check_object_relabel_type hook);
|
|
|
|
#endif /* SECLABEL_H */
|