-
+
Data Definition
There are several different privileges: SELECT>,
INSERT>, UPDATE>, DELETE>,
RULE>, REFERENCES>, TRIGGER>,
- CREATE>, TEMPORARY>, EXECUTE>,
- and USAGE>. The privileges applicable to a particular
+ CREATE>, TEMPORARY>, EXECUTE>, and
+ USAGE>. The privileges applicable to a particular
object vary depending on the object's type (table, function, etc).
- For complete
- information on the different types of privileges supported by
- <productname>PostgreSQL, refer to the
- reference page. The following sections
- and chapters will also show you how those privileges are used.
+ For complete information on the different types of privileges
+ supported by
PostgreSQL, refer to the
+ <xref linkend="sql-grant" endterm="sql-grant-title"> reference
+ page. The following sections and chapters will also show you how
+ those privileges are used.
To change the owner of a table, index, sequence, or view, use the
- command. There are corresponding
- ALTER> commands for other object types.
+
+ command. There are corresponding ALTER> commands for
+ other object types.
- Ordinarily, only the object's owner (or a superuser) can grant or revoke
- privileges on an object. However, it is possible to grant a privilege
- with grant option>, which gives the recipient the right to
- grant it in turn to others. If the grant option is subsequently revoked
- then all who received the privilege from that recipient (directly or
- through a chain of grants) will lose the privilege. For details see
- the and reference
- pages.
+ Ordinarily, only the object's owner (or a superuser) can grant or
+ revoke privileges on an object. However, it is possible to grant a
+ privilege with grant option>, which gives the recipient
+ the right to grant it in turn to others. If the grant option is
+ subsequently revoked then all who received the privilege from that
+ recipient (directly or through a chain of grants) will lose the
+ privilege. For details see the
+ endterm="sql-grant-title"> and
+ endterm="sql-revoke-title"> reference pages.
The session_user is normally the user who initiated
the current database connection; but superusers can change this setting
- with .
+ with endterm="sql-set-session-authorization-title">.
The current_user is the user identifier
that is applicable for permission checking. Normally, it is equal
to the session user, but it changes during the execution of
- The frequency and scope of the VACUUM> operations performed for each of
- these reasons will vary depending on the needs of each site.
- Therefore, database administrators must understand these issues and
- develop an appropriate maintenance strategy. This section concentrates
- on explaining the high-level issues; for details about command syntax
- and so on, see the reference page.
+ The frequency and scope of the VACUUM> operations
+ performed for each of these reasons will vary depending on the
+ needs of each site. Therefore, database administrators must
+ understand these issues and develop an appropriate maintenance
+ strategy. This section concentrates on explaining the high-level
+ issues; for details about command syntax and so on, see the
+ linkend="sql-vacuum" endterm="sql-vacuum-title"> reference page.
Databases are created with the SQL command
+
endterm="sql-createdatabase-title">:CREATE
DATABASE>>
CREATE DATABASE name>;
Databases are destroyed with the command
+
endterm="sql-dropdatabase-title">:DROP DATABASE>>
DROP DATABASE name>;
- To define a tablespace, use the
+ To define a tablespace, use the
+ linkend="sql-createtablespace" endterm="sql-createdatabase-title">
command, for example:
CREATE TABLESPACE>>
CREATE TABLESPACE fastspace LOCATION '/mnt/sda1/postgresql/data';
- To remove an empty tablespace, use the
- command.
+ To remove an empty tablespace, use the
+ linkend="sql-droptablespace" endterm="sql-droptablespace-title">
+ command.
To set the transaction isolation level of a transaction, use the
- command .
+ command endterm="sql-set-transaction-title">.
The list below shows the available lock modes and the contexts in
which they are used automatically by
PostgreSQL. You can also acquire any
- of these locks explicitly with the command .
+ of these locks explicitly with the command
+ linkend="sql-lock" endterm="sql-lock-title">.
Remember that all of these lock modes are table-level locks,
even if the name contains the word
row
; the names of the lock modes are historical.
where the file name for the source file must be available to the
backend server machine, not the client, since the backend server
reads the file directly. You can read more about the
- COPY command in .
+
COPY command in
+ endterm="sql-copy-title">.
- The commands <xref linkend="SQL-GRANT"> and
- <xref linkend="SQL-REVOKE">
- are used to set access privileges. See ">
+ The commands <command>GRANT> and
+ <command>REVOKE are used to set access privileges.
+ See ">
for more information.
- The commands <xref linkend="SQL-GRANT"> and
- <xref linkend="SQL-REVOKE">
- are used to set access privileges. See
- for more information.
+ The commands <command>GRANT> and
+ <command>REVOKE are used to set access privileges.
+ See for
+ more information.
- Consult and for more
- information.
+ Consult
and
+ linkend="sql-set-transaction"
+ endterm="sql-set-transaction-title"> for more information.
- Consult for more information.
+ Consult
+ endterm="sql-set-transaction-title"> for more information.