summaryrefslogtreecommitdiffstats
path: root/doc/src/sgml/man7/DROP_ROUTINE.7
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 12:17:33 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 12:17:33 +0000
commit5e45211a64149b3c659b90ff2de6fa982a5a93ed (patch)
tree739caf8c461053357daa9f162bef34516c7bf452 /doc/src/sgml/man7/DROP_ROUTINE.7
parentInitial commit. (diff)
downloadpostgresql-15-5e45211a64149b3c659b90ff2de6fa982a5a93ed.tar.xz
postgresql-15-5e45211a64149b3c659b90ff2de6fa982a5a93ed.zip
Adding upstream version 15.5.upstream/15.5
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'doc/src/sgml/man7/DROP_ROUTINE.7')
-rw-r--r--doc/src/sgml/man7/DROP_ROUTINE.7148
1 files changed, 148 insertions, 0 deletions
diff --git a/doc/src/sgml/man7/DROP_ROUTINE.7 b/doc/src/sgml/man7/DROP_ROUTINE.7
new file mode 100644
index 0000000..43acbac
--- /dev/null
+++ b/doc/src/sgml/man7/DROP_ROUTINE.7
@@ -0,0 +1,148 @@
+'\" t
+.\" Title: DROP ROUTINE
+.\" Author: The PostgreSQL Global Development Group
+.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
+.\" Date: 2023
+.\" Manual: PostgreSQL 15.5 Documentation
+.\" Source: PostgreSQL 15.5
+.\" Language: English
+.\"
+.TH "DROP ROUTINE" "7" "2023" "PostgreSQL 15.5" "PostgreSQL 15.5 Documentation"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+DROP_ROUTINE \- remove a routine
+.SH "SYNOPSIS"
+.sp
+.nf
+DROP ROUTINE [ IF EXISTS ] \fIname\fR [ ( [ [ \fIargmode\fR ] [ \fIargname\fR ] \fIargtype\fR [, \&.\&.\&.] ] ) ] [, \&.\&.\&.]
+ [ CASCADE | RESTRICT ]
+.fi
+.SH "DESCRIPTION"
+.PP
+\fBDROP ROUTINE\fR
+removes the definition of one or more existing routines\&. The term
+\(lqroutine\(rq
+includes aggregate functions, normal functions, and procedures\&. See under
+DROP AGGREGATE (\fBDROP_AGGREGATE\fR(7)),
+DROP FUNCTION (\fBDROP_FUNCTION\fR(7)), and
+DROP PROCEDURE (\fBDROP_PROCEDURE\fR(7))
+for the description of the parameters, more examples, and further details\&.
+.SH "NOTES"
+.PP
+The lookup rules used by
+\fBDROP ROUTINE\fR
+are fundamentally the same as for
+\fBDROP PROCEDURE\fR; in particular,
+\fBDROP ROUTINE\fR
+shares that command\*(Aqs behavior of considering an argument list that has no
+\fIargmode\fR
+markers to be possibly using the SQL standard\*(Aqs definition that
+OUT
+arguments are included in the list\&. (\fBDROP AGGREGATE\fR
+and
+\fBDROP FUNCTION\fR
+do not do that\&.)
+.PP
+In some cases where the same name is shared by routines of different kinds, it is possible for
+\fBDROP ROUTINE\fR
+to fail with an ambiguity error when a more specific command (\fBDROP FUNCTION\fR, etc\&.) would work\&. Specifying the argument type list more carefully will also resolve such problems\&.
+.PP
+These lookup rules are also used by other commands that act on existing routines, such as
+\fBALTER ROUTINE\fR
+and
+\fBCOMMENT ON ROUTINE\fR\&.
+.SH "EXAMPLES"
+.PP
+To drop the routine
+foo
+for type
+integer:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+DROP ROUTINE foo(integer);
+.fi
+.if n \{\
+.RE
+.\}
+.sp
+This command will work independent of whether
+foo
+is an aggregate, function, or procedure\&.
+.SH "COMPATIBILITY"
+.PP
+This command conforms to the SQL standard, with these
+PostgreSQL
+extensions:
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+The standard only allows one routine to be dropped per command\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+The
+IF EXISTS
+option is an extension\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+The ability to specify argument modes and names is an extension, and the lookup rules differ when modes are given\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+User\-definable aggregate functions are an extension\&.
+.RE
+.SH "SEE ALSO"
+DROP AGGREGATE (\fBDROP_AGGREGATE\fR(7)), DROP FUNCTION (\fBDROP_FUNCTION\fR(7)), DROP PROCEDURE (\fBDROP_PROCEDURE\fR(7)), ALTER ROUTINE (\fBALTER_ROUTINE\fR(7))
+.PP
+Note that there is no
+CREATE ROUTINE
+command\&.