-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
41 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
-- | ||
-- Remove the triggers and the functions to stop the process | ||
-- Return the information if the extension is started or not. | ||
-- If not started the has no action | ||
-- | ||
CREATE OR REPLACE FUNCTION @[email protected]_status() | ||
RETURNS text | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,7 +46,7 @@ CREATE TABLE @[email protected]_column_log ( | |
created_at timestamp with time zone DEFAULT current_timestamp | ||
); | ||
-- | ||
-- | ||
-- List the table to exclude | ||
-- | ||
CREATE TABLE @[email protected]_table_exclusion ( | ||
schema_name name, | ||
|
@@ -56,7 +56,9 @@ CREATE TABLE @[email protected]_table_exclusion ( | |
created_by text DEFAULT current_user, | ||
PRIMARY KEY (schema_name, table_name) | ||
); | ||
|
||
-- | ||
-- Collection of table names related to specific tools identified by tag | ||
-- | ||
CREATE TABLE @[email protected]_table_exclusion_templates ( | ||
schema_name name, | ||
table_name name, | ||
|
@@ -65,7 +67,3 @@ CREATE TABLE @[email protected]_table_exclusion_templates ( | |
created_by text DEFAULT current_user, | ||
PRIMARY KEY (schema_name, table_name) | ||
); | ||
|
||
-- | ||
-- | ||
-- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,16 @@ | ||
-- | ||
-- We assume that ddl_historization is installed in public schema | ||
-- Test the function schedoc_status | ||
-- | ||
SET search_path=public,pgtap; | ||
|
||
BEGIN; | ||
|
||
SELECT plan(2); | ||
SELECT plan(3); | ||
|
||
SELECT has_extension('schedoc'); | ||
|
||
SELECT has_function('_TEST_SCHEMA_'::name, 'schedoc_status'::name); | ||
|
||
SELECT function_returns('_TEST_SCHEMA_'::name, 'schedoc_status'::name, 'text'); | ||
|
||
ROLLBACK; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,17 @@ | ||
-- | ||
-- We assume that ddl_historization is installed in public schema | ||
-- Test the function schedoc_stop | ||
-- | ||
|
||
SET search_path=public,pgtap; | ||
|
||
BEGIN; | ||
|
||
SELECT plan(2); | ||
SELECT plan(3); | ||
|
||
SELECT has_extension('schedoc'); | ||
|
||
SELECT has_function('_TEST_SCHEMA_'::name, 'schedoc_stop'::name); | ||
|
||
SELECT function_returns('_TEST_SCHEMA_'::name, 'schedoc_stop'::name, 'void'); | ||
|
||
ROLLBACK; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,26 @@ | ||
-- | ||
-- We assume that ddl_historization is installed in public schema | ||
-- Test functions | ||
-- | ||
|
||
SET search_path=public,pgtap; | ||
|
||
BEGIN; | ||
|
||
SELECT plan(5); | ||
SELECT plan(9); | ||
|
||
SELECT has_extension('schedoc'); | ||
|
||
SELECT has_function('_TEST_SCHEMA_'::name, 'schedoc_start'::name); | ||
SELECT has_function('_TEST_SCHEMA_'::name, 'schedoc_fill_raw'::name); | ||
SELECT function_returns('_TEST_SCHEMA_'::name, 'schedoc_start'::name, 'void'); | ||
|
||
SELECT has_function('_TEST_SCHEMA_'::name, 'schedoc_fill_raw'::name, ARRAY['oid', 'oid']); | ||
SELECT function_returns('_TEST_SCHEMA_'::name, 'schedoc_fill_raw'::name, ARRAY['oid', 'oid'], 'void'); | ||
|
||
|
||
SELECT has_function('_TEST_SCHEMA_'::name, 'schedoc_get_column_description'::name, ARRAY['oid', 'oid']); | ||
SELECT function_returns('_TEST_SCHEMA_'::name, 'schedoc_get_column_description'::name, ARRAY['oid', 'oid'], 'text'); | ||
|
||
SELECT has_function('_TEST_SCHEMA_'::name, 'schedoc_get_column_status'::name, ARRAY['oid', 'oid']); | ||
SELECT function_returns('_TEST_SCHEMA_'::name, 'schedoc_get_column_status'::name, ARRAY['oid', 'oid'], 'text'); | ||
|
||
ROLLBACK; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters