1RELEASE SAVEPOINT(7)             SQL Commands             RELEASE SAVEPOINT(7)
2
3
4

NAME

6       RELEASE SAVEPOINT - destroy a previously defined savepoint
7
8

SYNOPSIS

10       RELEASE [ SAVEPOINT ] savepoint_name
11
12

DESCRIPTION

14       RELEASE  SAVEPOINT  destroys a savepoint previously defined in the cur‐
15       rent transaction.
16
17       Destroying a savepoint makes it unavailable as a rollback point, but it
18       has  no  other  user  visible behavior. It does not undo the effects of
19       commands executed after the savepoint was established.   (To  do  that,
20       see  ROLLBACK  TO  SAVEPOINT  [rollback_to_savepoint(7)].) Destroying a
21       savepoint when it is no longer needed allows the system to reclaim some
22       resources earlier than transaction end.
23
24       RELEASE  SAVEPOINT  also  destroys all savepoints that were established
25       after the named savepoint was established.
26

PARAMETERS

28       savepoint_name
29              The name of the savepoint to destroy.
30

NOTES

32       Specifying a savepoint name that  was  not  previously  defined  is  an
33       error.
34
35       It is not possible to release a savepoint when the transaction is in an
36       aborted state.
37
38       If multiple savepoints have the same name, only the one that  was  most
39       recently defined is released.
40

EXAMPLES

42       To establish and later destroy a savepoint:
43
44       BEGIN;
45           INSERT INTO table1 VALUES (3);
46           SAVEPOINT my_savepoint;
47           INSERT INTO table1 VALUES (4);
48           RELEASE SAVEPOINT my_savepoint;
49       COMMIT;
50
51       The above transaction will insert both 3 and 4.
52

COMPATIBILITY

54       This  command conforms to the SQL standard. The standard specifies that
55       the key word SAVEPOINT is mandatory, but PostgreSQL  allows  it  to  be
56       omitted.
57

SEE ALSO

59       BEGIN  [begin(7)], COMMIT [commit(7)], ROLLBACK [rollback(7)], ROLLBACK
60       TO SAVEPOINT [rollback_to_savepoint(7)], SAVEPOINT [savepoint(7)]
61
62
63
64SQL - Language Statements         2011-09-22              RELEASE SAVEPOINT(7)
Impressum