]> begriffs open source - ai-pg/blob - full-docs/txt/sql-dropsequence.txt
Convert HTML docs to more streamlined TXT
[ai-pg] / full-docs / txt / sql-dropsequence.txt
1
2 DROP SEQUENCE
3
4    DROP SEQUENCE — remove a sequence
5
6 Synopsis
7
8 DROP SEQUENCE [ IF EXISTS ] name [, ...] [ CASCADE | RESTRICT ]
9
10 Description
11
12    DROP SEQUENCE removes sequence number generators. A sequence can only
13    be dropped by its owner or a superuser.
14
15 Parameters
16
17    IF EXISTS
18           Do not throw an error if the sequence does not exist. A notice
19           is issued in this case.
20
21    name
22           The name (optionally schema-qualified) of a sequence.
23
24    CASCADE
25           Automatically drop objects that depend on the sequence, and in
26           turn all objects that depend on those objects (see
27           Section 5.15).
28
29    RESTRICT
30           Refuse to drop the sequence if any objects depend on it. This is
31           the default.
32
33 Examples
34
35    To remove the sequence serial:
36 DROP SEQUENCE serial;
37
38 Compatibility
39
40    DROP SEQUENCE conforms to the SQL standard, except that the standard
41    only allows one sequence to be dropped per command, and apart from the
42    IF EXISTS option, which is a PostgreSQL extension.
43
44 See Also
45
46    CREATE SEQUENCE, ALTER SEQUENCE