~ubuntu-branches/ubuntu/oneiric/postgresql-9.1/oneiric-security

« back to all changes in this revision

Viewing changes to doc/src/sgml/man7/UPDATE.7

  • Committer: Package Import Robot
  • Author(s): Martin Pitt
  • Date: 2013-02-05 18:13:52 UTC
  • mfrom: (1.1.10) (10.1.5 oneiric-proposed)
  • Revision ID: package-import@ubuntu.com-20130205181352-3kw4f94ilqklzm7c
Tags: 9.1.8-0ubuntu11.10
* New upstream security/bug fix release: (LP: #1116336)
  - Prevent execution of enum_recv from SQL
    The function was misdeclared, allowing a simple SQL command to crash the
    server.  In principle an attacker might be able to use it to examine the
    contents of server memory.  Our thanks to Sumit Soni (via Secunia SVCRP)
    for reporting this issue. (CVE-2013-0255)
  - See HISTORY/changelog.gz for the other bug fixes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
.\"     Title: UPDATE
3
3
.\"    Author: The PostgreSQL Global Development Group
4
4
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
5
 
.\"      Date: 2012-08-14
6
 
.\"    Manual: PostgreSQL 9.1.5 Documentation
7
 
.\"    Source: PostgreSQL 9.1.5
 
5
.\"      Date: 2013-02-04
 
6
.\"    Manual: PostgreSQL 9.1.8 Documentation
 
7
.\"    Source: PostgreSQL 9.1.8
8
8
.\"  Language: English
9
9
.\"
10
 
.TH "UPDATE" "7" "2012-08-14" "PostgreSQL 9.1.5" "PostgreSQL 9.1.5 Documentation"
 
10
.TH "UPDATE" "7" "2013-02-04" "PostgreSQL 9.1.8" "PostgreSQL 9.1.8 Documentation"
11
11
.\" -----------------------------------------------------------------
12
12
.\" * Define some portability stuff
13
13
.\" -----------------------------------------------------------------
34
34
.sp
35
35
.nf
36
36
[ WITH [ RECURSIVE ] \fIwith_query\fR [, \&.\&.\&.] ]
37
 
UPDATE [ ONLY ] \fItable\fR [ [ AS ] \fIalias\fR ]
 
37
UPDATE [ ONLY ] \fItable\fR [ * ] [ [ AS ] \fIalias\fR ]
38
38
    SET { \fIcolumn\fR = { \fIexpression\fR | DEFAULT } |
39
39
          ( \fIcolumn\fR [, \&.\&.\&.] ) = ( { \fIexpression\fR | DEFAULT } [, \&.\&.\&.] ) } [, \&.\&.\&.]
40
40
    [ FROM \fIfrom_list\fR ]
49
49
SET
50
50
clause; columns not explicitly modified retain their previous values\&.
51
51
.PP
52
 
By default,
53
 
UPDATE
54
 
will update rows in the specified table and all its subtables\&. If you wish to only update the specific table mentioned, you must use the
55
 
ONLY
56
 
clause\&.
57
 
.PP
58
52
There are two ways to modify a table using information contained in other tables in the database: using sub\-selects, or specifying additional tables in the
59
53
FROM
60
54
clause\&. Which technique is more appropriate depends on the specific circumstances\&.
94
88
.PP
95
89
\fItable\fR
96
90
.RS 4
97
 
The name (optionally schema\-qualified) of the table to update\&.
 
91
The name (optionally schema\-qualified) of the table to update\&. If
 
92
ONLY
 
93
is specified before the table name, matching rows are updated in the named table only\&. If
 
94
ONLY
 
95
is not specified, matching rows are also updated in any tables inheriting from the named table\&. Optionally,
 
96
*
 
97
can be specified after the table name to explicitly indicate that descendant tables are included\&.
98
98
.RE
99
99
.PP
100
100
\fIalias\fR