]> begriffs open source - ai-pg/blob - full-docs/txt/sql-dropcast.txt
Convert HTML docs to more streamlined TXT
[ai-pg] / full-docs / txt / sql-dropcast.txt
1
2 DROP CAST
3
4    DROP CAST — remove a cast
5
6 Synopsis
7
8 DROP CAST [ IF EXISTS ] (source_type AS target_type) [ CASCADE | RESTRICT ]
9
10 Description
11
12    DROP CAST removes a previously defined cast.
13
14    To be able to drop a cast, you must own the source or the target data
15    type. These are the same privileges that are required to create a cast.
16
17 Parameters
18
19    IF EXISTS
20           Do not throw an error if the cast does not exist. A notice is
21           issued in this case.
22
23    source_type
24           The name of the source data type of the cast.
25
26    target_type
27           The name of the target data type of the cast.
28
29    CASCADE
30           RESTRICT
31           These key words do not have any effect, since there are no
32           dependencies on casts.
33
34 Examples
35
36    To drop the cast from type text to type int:
37 DROP CAST (text AS int);
38
39 Compatibility
40
41    The DROP CAST command conforms to the SQL standard.
42
43 See Also
44
45    CREATE CAST