diff options
Diffstat (limited to 'contrib/spi')
-rw-r--r-- | contrib/spi/.gitignore | 5 | ||||
-rw-r--r-- | contrib/spi/Makefile | 10 | ||||
-rw-r--r-- | contrib/spi/autoinc--1.0.sql | 6 | ||||
-rw-r--r-- | contrib/spi/autoinc--unpackaged--1.0.sql | 3 | ||||
-rw-r--r-- | contrib/spi/autoinc.control | 5 | ||||
-rw-r--r-- | contrib/spi/autoinc.sql.in | 9 | ||||
-rw-r--r-- | contrib/spi/insert_username--1.0.sql | 6 | ||||
-rw-r--r-- | contrib/spi/insert_username--unpackaged--1.0.sql | 3 | ||||
-rw-r--r-- | contrib/spi/insert_username.control | 5 | ||||
-rw-r--r-- | contrib/spi/insert_username.sql.in | 9 | ||||
-rw-r--r-- | contrib/spi/moddatetime--1.0.sql | 6 | ||||
-rw-r--r-- | contrib/spi/moddatetime--unpackaged--1.0.sql | 3 | ||||
-rw-r--r-- | contrib/spi/moddatetime.control | 5 | ||||
-rw-r--r-- | contrib/spi/moddatetime.sql.in | 9 | ||||
-rw-r--r-- | contrib/spi/refint--1.0.sql (renamed from contrib/spi/refint.sql.in) | 5 | ||||
-rw-r--r-- | contrib/spi/refint--unpackaged--1.0.sql | 4 | ||||
-rw-r--r-- | contrib/spi/refint.control | 5 | ||||
-rw-r--r-- | contrib/spi/timetravel--1.0.sql (renamed from contrib/spi/timetravel.sql.in) | 5 | ||||
-rw-r--r-- | contrib/spi/timetravel--unpackaged--1.0.sql | 5 | ||||
-rw-r--r-- | contrib/spi/timetravel.control | 5 |
20 files changed, 72 insertions, 41 deletions
diff --git a/contrib/spi/.gitignore b/contrib/spi/.gitignore deleted file mode 100644 index 6c07a33b11..0000000000 --- a/contrib/spi/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -/autoinc.sql -/insert_username.sql -/moddatetime.sql -/refint.sql -/timetravel.sql diff --git a/contrib/spi/Makefile b/contrib/spi/Makefile index 531d406605..0c11bfcbbd 100644 --- a/contrib/spi/Makefile +++ b/contrib/spi/Makefile @@ -1,7 +1,15 @@ # contrib/spi/Makefile MODULES = autoinc insert_username moddatetime refint timetravel -DATA_built = $(addsuffix .sql, $(MODULES)) + +EXTENSION = autoinc insert_username moddatetime refint timetravel + +DATA = autoinc--1.0.sql autoinc--unpackaged--1.0.sql \ + insert_username--1.0.sql insert_username--unpackaged--1.0.sql \ + moddatetime--1.0.sql moddatetime--unpackaged--1.0.sql \ + refint--1.0.sql refint--unpackaged--1.0.sql \ + timetravel--1.0.sql timetravel--unpackaged--1.0.sql + DOCS = $(addsuffix .example, $(MODULES)) # this is needed for the regression tests; diff --git a/contrib/spi/autoinc--1.0.sql b/contrib/spi/autoinc--1.0.sql new file mode 100644 index 0000000000..bf5ecab08b --- /dev/null +++ b/contrib/spi/autoinc--1.0.sql @@ -0,0 +1,6 @@ +/* contrib/spi/autoinc--1.0.sql */ + +CREATE OR REPLACE FUNCTION autoinc() +RETURNS trigger +AS 'MODULE_PATHNAME' +LANGUAGE C; diff --git a/contrib/spi/autoinc--unpackaged--1.0.sql b/contrib/spi/autoinc--unpackaged--1.0.sql new file mode 100644 index 0000000000..232e9170fc --- /dev/null +++ b/contrib/spi/autoinc--unpackaged--1.0.sql @@ -0,0 +1,3 @@ +/* contrib/spi/autoinc--unpackaged--1.0.sql */ + +ALTER EXTENSION autoinc ADD function autoinc(); diff --git a/contrib/spi/autoinc.control b/contrib/spi/autoinc.control new file mode 100644 index 0000000000..1d7a8e53d4 --- /dev/null +++ b/contrib/spi/autoinc.control @@ -0,0 +1,5 @@ +# autoinc extension +comment = 'functions for autoincrementing fields' +default_version = '1.0' +module_pathname = '$libdir/autoinc' +relocatable = true diff --git a/contrib/spi/autoinc.sql.in b/contrib/spi/autoinc.sql.in deleted file mode 100644 index 1fa322f9c7..0000000000 --- a/contrib/spi/autoinc.sql.in +++ /dev/null @@ -1,9 +0,0 @@ -/* contrib/spi/autoinc.sql.in */ - --- Adjust this setting to control where the objects get created. -SET search_path = public; - -CREATE OR REPLACE FUNCTION autoinc() -RETURNS trigger -AS 'MODULE_PATHNAME' -LANGUAGE C; diff --git a/contrib/spi/insert_username--1.0.sql b/contrib/spi/insert_username--1.0.sql new file mode 100644 index 0000000000..3867c57a2c --- /dev/null +++ b/contrib/spi/insert_username--1.0.sql @@ -0,0 +1,6 @@ +/* contrib/spi/insert_username--1.0.sql */ + +CREATE OR REPLACE FUNCTION insert_username() +RETURNS trigger +AS 'MODULE_PATHNAME' +LANGUAGE C; diff --git a/contrib/spi/insert_username--unpackaged--1.0.sql b/contrib/spi/insert_username--unpackaged--1.0.sql new file mode 100644 index 0000000000..f53cb690f1 --- /dev/null +++ b/contrib/spi/insert_username--unpackaged--1.0.sql @@ -0,0 +1,3 @@ +/* contrib/spi/insert_username--unpackaged--1.0.sql */ + +ALTER EXTENSION insert_username ADD function insert_username(); diff --git a/contrib/spi/insert_username.control b/contrib/spi/insert_username.control new file mode 100644 index 0000000000..9d110643ee --- /dev/null +++ b/contrib/spi/insert_username.control @@ -0,0 +1,5 @@ +# insert_username extension +comment = 'functions for tracking who changed a table' +default_version = '1.0' +module_pathname = '$libdir/insert_username' +relocatable = true diff --git a/contrib/spi/insert_username.sql.in b/contrib/spi/insert_username.sql.in deleted file mode 100644 index bdc2deb340..0000000000 --- a/contrib/spi/insert_username.sql.in +++ /dev/null @@ -1,9 +0,0 @@ -/* contrib/spi/insert_username.sql.in */ - --- Adjust this setting to control where the objects get created. -SET search_path = public; - -CREATE OR REPLACE FUNCTION insert_username() -RETURNS trigger -AS 'MODULE_PATHNAME' -LANGUAGE C; diff --git a/contrib/spi/moddatetime--1.0.sql b/contrib/spi/moddatetime--1.0.sql new file mode 100644 index 0000000000..00971c9fe1 --- /dev/null +++ b/contrib/spi/moddatetime--1.0.sql @@ -0,0 +1,6 @@ +/* contrib/spi/moddatetime--1.0.sql */ + +CREATE OR REPLACE FUNCTION moddatetime() +RETURNS trigger +AS 'MODULE_PATHNAME' +LANGUAGE C; diff --git a/contrib/spi/moddatetime--unpackaged--1.0.sql b/contrib/spi/moddatetime--unpackaged--1.0.sql new file mode 100644 index 0000000000..f3a0a96837 --- /dev/null +++ b/contrib/spi/moddatetime--unpackaged--1.0.sql @@ -0,0 +1,3 @@ +/* contrib/spi/moddatetime--unpackaged--1.0.sql */ + +ALTER EXTENSION moddatetime ADD function moddatetime(); diff --git a/contrib/spi/moddatetime.control b/contrib/spi/moddatetime.control new file mode 100644 index 0000000000..93dfac589a --- /dev/null +++ b/contrib/spi/moddatetime.control @@ -0,0 +1,5 @@ +# moddatetime extension +comment = 'functions for tracking last modification time' +default_version = '1.0' +module_pathname = '$libdir/moddatetime' +relocatable = true diff --git a/contrib/spi/moddatetime.sql.in b/contrib/spi/moddatetime.sql.in deleted file mode 100644 index e4ca6a6653..0000000000 --- a/contrib/spi/moddatetime.sql.in +++ /dev/null @@ -1,9 +0,0 @@ -/* contrib/spi/moddatetime.sql.in */ - --- Adjust this setting to control where the objects get created. -SET search_path = public; - -CREATE OR REPLACE FUNCTION moddatetime() -RETURNS trigger -AS 'MODULE_PATHNAME' -LANGUAGE C; diff --git a/contrib/spi/refint.sql.in b/contrib/spi/refint--1.0.sql index 2525b70006..5a50226c43 100644 --- a/contrib/spi/refint.sql.in +++ b/contrib/spi/refint--1.0.sql @@ -1,7 +1,4 @@ -/* contrib/spi/refint.sql.in */ - --- Adjust this setting to control where the objects get created. -SET search_path = public; +/* contrib/spi/refint--1.0.sql */ CREATE OR REPLACE FUNCTION check_primary_key() RETURNS trigger diff --git a/contrib/spi/refint--unpackaged--1.0.sql b/contrib/spi/refint--unpackaged--1.0.sql new file mode 100644 index 0000000000..54fece055a --- /dev/null +++ b/contrib/spi/refint--unpackaged--1.0.sql @@ -0,0 +1,4 @@ +/* contrib/spi/refint--unpackaged--1.0.sql */ + +ALTER EXTENSION refint ADD function check_primary_key(); +ALTER EXTENSION refint ADD function check_foreign_key(); diff --git a/contrib/spi/refint.control b/contrib/spi/refint.control new file mode 100644 index 0000000000..cbede45784 --- /dev/null +++ b/contrib/spi/refint.control @@ -0,0 +1,5 @@ +# refint extension +comment = 'functions for implementing referential integrity (obsolete)' +default_version = '1.0' +module_pathname = '$libdir/refint' +relocatable = true diff --git a/contrib/spi/timetravel.sql.in b/contrib/spi/timetravel--1.0.sql index 83dc958a88..c9f786218f 100644 --- a/contrib/spi/timetravel.sql.in +++ b/contrib/spi/timetravel--1.0.sql @@ -1,7 +1,4 @@ -/* contrib/spi/timetravel.sql.in */ - --- Adjust this setting to control where the objects get created. -SET search_path = public; +/* contrib/spi/timetravel--1.0.sql */ CREATE OR REPLACE FUNCTION timetravel() RETURNS trigger diff --git a/contrib/spi/timetravel--unpackaged--1.0.sql b/contrib/spi/timetravel--unpackaged--1.0.sql new file mode 100644 index 0000000000..e3716afe95 --- /dev/null +++ b/contrib/spi/timetravel--unpackaged--1.0.sql @@ -0,0 +1,5 @@ +/* contrib/spi/timetravel--unpackaged--1.0.sql */ + +ALTER EXTENSION timetravel ADD function timetravel(); +ALTER EXTENSION timetravel ADD function set_timetravel(name,integer); +ALTER EXTENSION timetravel ADD function get_timetravel(name); diff --git a/contrib/spi/timetravel.control b/contrib/spi/timetravel.control new file mode 100644 index 0000000000..9b4bb6ba04 --- /dev/null +++ b/contrib/spi/timetravel.control @@ -0,0 +1,5 @@ +# timetravel extension +comment = 'functions for implementing time travel' +default_version = '1.0' +module_pathname = '$libdir/timetravel' +relocatable = true |