diff options
| author | Even Rouault <even.rouault@mines-paris.org> | 2018-11-15 10:12:17 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-11-15 10:12:17 +0100 |
| commit | 4ad1477c24c3da4be6c7962606e6f9d47336b6a3 (patch) | |
| tree | eb4ca374b50ab3c1183a25ac264245c7b4fd681b /data/sql/commit.sql | |
| parent | 73865a4df1a7d4c37052647f0458567751735f00 (diff) | |
| parent | d928db15d53805d9b728b440079756081961c536 (diff) | |
| download | PROJ-4ad1477c24c3da4be6c7962606e6f9d47336b6a3.tar.gz PROJ-4ad1477c24c3da4be6c7962606e6f9d47336b6a3.zip | |
Merge pull request #1175 from rouault/iso19111_for_merge
Implement RFC 2: Initial integration of "GDAL SRS barn" work
Diffstat (limited to 'data/sql/commit.sql')
| -rw-r--r-- | data/sql/commit.sql | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/data/sql/commit.sql b/data/sql/commit.sql new file mode 100644 index 00000000..346c5b76 --- /dev/null +++ b/data/sql/commit.sql @@ -0,0 +1,28 @@ +COMMIT; + +-- Do an explicit foreign_key_check as foreign key checking is a no-op within +-- a transaction. Unfortunately we can't ask for this to be an error, so this +-- is just for verbose output. In Makefile, we check this separately +PRAGMA foreign_key_check; + +-- Final consistency checks +CREATE TABLE dummy(foo); +CREATE TRIGGER final_checks +BEFORE INSERT ON dummy +FOR EACH ROW BEGIN + + -- check that view definitions have no error + SELECT RAISE(ABORT, 'corrupt definition of coordinate_operation_view') + WHERE (SELECT 1 FROM coordinate_operation_view LIMIT 1) = 0; + SELECT RAISE(ABORT, 'corrupt definition of crs_view') + WHERE (SELECT 1 FROM crs_view LIMIT 1) = 0; + SELECT RAISE(ABORT, 'corrupt definition of object_view') + WHERE (SELECT 1 FROM object_view LIMIT 1) = 0; + SELECT RAISE(ABORT, 'corrupt definition of authority_list') + WHERE (SELECT 1 FROM authority_list LIMIT 1) = 0; +END; +INSERT INTO dummy DEFAULT VALUES; +DROP TRIGGER final_checks; +DROP TABLE dummy; + +VACUUM;
\ No newline at end of file |
