Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
angproj
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Cedric Cathomas
angproj
Commits
7fdc3529
Commit
7fdc3529
authored
6 years ago
by
Raphael Das Gupta
Browse files
Options
Downloads
Patches
Plain Diff
Don't abort containt tests when ON_ERROR_STOP is enabled
using the approach from
https://stackoverflow.com/a/52744435/674064
parent
f5ea1cc6
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
5_queries.sql
+12
-4
12 additions, 4 deletions
5_queries.sql
with
12 additions
and
4 deletions
5_queries.sql
+
12
−
4
View file @
7fdc3529
...
...
@@ -86,7 +86,8 @@ ROLLBACK;
-- Constraints Tests
-- do not alter contents of the database persistently
BEGIN
;
DO
$$
BEGIN
ALTER
TABLE
Angestellter
ADD
CONSTRAINT
check_Salaer
...
...
@@ -96,10 +97,14 @@ UPDATE angestellter SET salaer=30000 where persnr = 1100;
select
*
from
angestellter
WHERE
persnr
=
1100
;
-- forget all changes made since BEGIN
ROLLBACK
;
EXCEPTION
WHEN
integrity_constraint_violation
THEN
RAISE
NOTICE
'The constraint worked and made the UPDATE fail with message: %'
,
SQLERRM
;
END
;
$$
;
-- do not alter contents of the database persistently
BEGIN
;
DO
$$
BEGIN
ALTER
TABLE
ProjektZuteilung
ADD
CONSTRAINT
check_Zeitanteil
...
...
@@ -109,4 +114,7 @@ UPDATE ProjektZuteilung SET Zeitanteil=99 where persnr = 1100;
select
*
from
ProjektZuteilung
WHERE
persnr
=
1100
;
-- forget all changes made since BEGIN
ROLLBACK
;
EXCEPTION
WHEN
integrity_constraint_violation
THEN
RAISE
NOTICE
'The constraint worked and made the UPDATE fail with message: %'
,
SQLERRM
;
END
;
$$
;
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment