test_shm_mq \
test_parser
+all: submake-errcodes
+
+submake-errcodes:
+ $(MAKE) -C $(top_builddir)/src/backend submake-errcodes
+
$(recurse)
MODULES = dummy_seclabel
PGFILEDESC = "dummy_seclabel - regression testing of the SECURITY LABEL statement"
+EXTENSION = dummy_seclabel
+DATA = dummy_seclabel--1.0.sql
+
REGRESS = dummy_seclabel
EXTRA_CLEAN = sql/dummy_seclabel.sql expected/dummy_seclabel.out
--- /dev/null
+/* src/test/modules/dummy_seclabel/dummy_seclabel--1.0.sql */
+
+-- complain if script is sourced in psql, rather than via CREATE EXTENSION
+\echo Use "CREATE EXTENSION dummy_seclabel" to load this file. \quit
+
+CREATE FUNCTION dummy_seclabel_dummy()
+ RETURNS pg_catalog.void
+ AS 'MODULE_PATHNAME' LANGUAGE C;
+
/* Entrypoint of the module */
void _PG_init(void);
+PG_FUNCTION_INFO_V1(dummy_seclabel_dummy);
+
static void
dummy_object_relabel(const ObjectAddress *object, const char *seclabel)
{
{
register_label_provider("dummy", dummy_object_relabel);
}
+
+/*
+ * This function is here just so that the extension is not completely empty
+ * and the dynamic library is loaded when CREATE EXTENSION runs.
+ */
+Datum
+dummy_seclabel_dummy(PG_FUNCTION_ARGS)
+{
+ PG_RETURN_VOID();
+}
--- /dev/null
+comment = 'Test code for SECURITY LABEL feature'
+default_version = '1.0'
+module_pathname = '$libdir/dummy_seclabel'
+relocatable = true
+++ /dev/null
-/dummy_seclabel.out
--
-- Test for facilities of security label
--
-LOAD '@libdir@/dummy_seclabel@DLSUFFIX@';
+CREATE EXTENSION dummy_seclabel;
-- initial setups
SET client_min_messages TO 'warning';
DROP ROLE IF EXISTS dummy_seclabel_user1;
+++ /dev/null
-/dummy_seclabel.sql
--
-- Test for facilities of security label
--
-LOAD '@libdir@/dummy_seclabel@DLSUFFIX@';
+CREATE EXTENSION dummy_seclabel;
-- initial setups
SET client_min_messages TO 'warning';