]> begriffs open source - ai-pg/blob - full-docs/man7/DROP_CAST.7
Convert HTML docs to more streamlined TXT
[ai-pg] / full-docs / man7 / DROP_CAST.7
1 '\" t
2 .\"     Title: DROP CAST
3 .\"    Author: The PostgreSQL Global Development Group
4 .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
5 .\"      Date: 2025
6 .\"    Manual: PostgreSQL 18.0 Documentation
7 .\"    Source: PostgreSQL 18.0
8 .\"  Language: English
9 .\"
10 .TH "DROP CAST" "7" "2025" "PostgreSQL 18.0" "PostgreSQL 18.0 Documentation"
11 .\" -----------------------------------------------------------------
12 .\" * Define some portability stuff
13 .\" -----------------------------------------------------------------
14 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 .\" http://bugs.debian.org/507673
16 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18 .ie \n(.g .ds Aq \(aq
19 .el       .ds Aq '
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
24 .nh
25 .\" disable justification (adjust text to left margin only)
26 .ad l
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
30 .SH "NAME"
31 DROP_CAST \- remove a cast
32 .SH "SYNOPSIS"
33 .sp
34 .nf
35 DROP CAST [ IF EXISTS ] (\fIsource_type\fR AS \fItarget_type\fR) [ CASCADE | RESTRICT ]
36 .fi
37 .SH "DESCRIPTION"
38 .PP
39 \fBDROP CAST\fR
40 removes a previously defined cast\&.
41 .PP
42 To be able to drop a cast, you must own the source or the target data type\&. These are the same privileges that are required to create a cast\&.
43 .SH "PARAMETERS"
44 .PP
45 IF EXISTS
46 .RS 4
47 Do not throw an error if the cast does not exist\&. A notice is issued in this case\&.
48 .RE
49 .PP
50 \fIsource_type\fR
51 .RS 4
52 The name of the source data type of the cast\&.
53 .RE
54 .PP
55 \fItarget_type\fR
56 .RS 4
57 The name of the target data type of the cast\&.
58 .RE
59 .PP
60 CASCADE
61 .br
62 RESTRICT
63 .RS 4
64 These key words do not have any effect, since there are no dependencies on casts\&.
65 .RE
66 .SH "EXAMPLES"
67 .PP
68 To drop the cast from type
69 text
70 to type
71 int:
72 .sp
73 .if n \{\
74 .RS 4
75 .\}
76 .nf
77 DROP CAST (text AS int);
78 .fi
79 .if n \{\
80 .RE
81 .\}
82 .SH "COMPATIBILITY"
83 .PP
84 The
85 \fBDROP CAST\fR
86 command conforms to the SQL standard\&.
87 .SH "SEE ALSO"
88 CREATE CAST (\fBCREATE_CAST\fR(7))