mirror of
https://github.com/postgres/postgres.git
synced 2025-07-23 00:02:06 -04:00
Compare commits
5 Commits
65810fc6d0
...
36726b7882
Author | SHA1 | Date | |
---|---|---|---|
|
36726b7882 | ||
|
0193177566 | ||
|
d3246a2ad8 | ||
|
1f7d7f102d | ||
|
421100b2ed |
@ -207,6 +207,12 @@ createdb -O <replaceable>rolename</replaceable> <replaceable>dbname</replaceable
|
|||||||
action being taken when those databases are created.
|
action being taken when those databases are created.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
However, <command>CREATE DATABASE</command> does not copy database-level
|
||||||
|
<command>GRANT</command> permissions attached to the source database.
|
||||||
|
The new database has default database-level permissions.
|
||||||
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
There is a second standard system database named
|
There is a second standard system database named
|
||||||
<literal>template0</literal>.<indexterm><primary>template0</primary></indexterm> This
|
<literal>template0</literal>.<indexterm><primary>template0</primary></indexterm> This
|
||||||
|
@ -137,7 +137,11 @@ REVOKE [ GRANT OPTION FOR ]
|
|||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
The name of an existing role of which the current role is a member.
|
The name of an existing role of which the current role is a member.
|
||||||
If <literal>FOR ROLE</literal> is omitted, the current role is assumed.
|
Default access privileges are not inherited, so member roles
|
||||||
|
must use <command>SET ROLE</command> to access these privileges,
|
||||||
|
or <command>ALTER DEFAULT PRIVILEGES</command> must be run for
|
||||||
|
each member role. If <literal>FOR ROLE</literal> is omitted,
|
||||||
|
the current role is assumed.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
@ -59,15 +59,17 @@ CREATE [ OR REPLACE ] RULE <replaceable class="parameter">name</replaceable> AS
|
|||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Presently, <literal>ON SELECT</literal> rules must be unconditional
|
Presently, <literal>ON SELECT</literal> rules can only be attached
|
||||||
<literal>INSTEAD</literal> rules and must have actions that consist
|
to views. (Attaching one to a table converts the table into a view.)
|
||||||
of a single <command>SELECT</command> command. Thus, an
|
Such a rule must be named <literal>"_RETURN"</literal>,
|
||||||
<literal>ON SELECT</literal> rule effectively turns the table into
|
must be an unconditional <literal>INSTEAD</literal> rule, and must have
|
||||||
a view, whose visible contents are the rows returned by the rule's
|
an action that consists of a single <command>SELECT</command> command.
|
||||||
<command>SELECT</command> command rather than whatever had been
|
This command defines the visible contents of the view. (The view
|
||||||
stored in the table (if anything). It is considered better style
|
itself is basically a dummy table with no storage.) It's best to
|
||||||
to write a <command>CREATE VIEW</command> command than to create a
|
regard such a rule as an implementation detail. While a view can be
|
||||||
real table and define an <literal>ON SELECT</literal> rule for it.
|
redefined via <literal>CREATE OR REPLACE RULE "_RETURN" AS
|
||||||
|
...</literal>, it's better style to use <literal>CREATE OR REPLACE
|
||||||
|
VIEW</literal>.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
|
@ -1076,6 +1076,10 @@ testdb=>
|
|||||||
destination, because all data must pass through the client/server
|
destination, because all data must pass through the client/server
|
||||||
connection. For large amounts of data the <acronym>SQL</acronym>
|
connection. For large amounts of data the <acronym>SQL</acronym>
|
||||||
command might be preferable.
|
command might be preferable.
|
||||||
|
Also, because of this pass-through method, <literal>\copy
|
||||||
|
... from</literal> in <acronym>CSV</acronym> mode will erroneously
|
||||||
|
treat a <literal>\.</literal> data value alone on a line as an
|
||||||
|
end-of-input marker.
|
||||||
</para>
|
</para>
|
||||||
</tip>
|
</tip>
|
||||||
|
|
||||||
|
@ -1156,7 +1156,7 @@ check_for_removed_data_type_usage(ClusterInfo *cluster, const char *version,
|
|||||||
|
|
||||||
if (check_for_data_type_usage(cluster, typename, output_path))
|
if (check_for_data_type_usage(cluster, typename, output_path))
|
||||||
{
|
{
|
||||||
pg_log(PG_REPORT, "fatal");
|
pg_log(PG_REPORT, "fatal\n");
|
||||||
pg_fatal("Your installation contains the \"%s\" data type in user tables.\n"
|
pg_fatal("Your installation contains the \"%s\" data type in user tables.\n"
|
||||||
"The \"%s\" type has been removed in PostgreSQL version %s,\n"
|
"The \"%s\" type has been removed in PostgreSQL version %s,\n"
|
||||||
"so this cluster cannot currently be upgraded. You can drop the\n"
|
"so this cluster cannot currently be upgraded. You can drop the\n"
|
||||||
|
@ -631,6 +631,7 @@ handleCopyIn(PGconn *conn, FILE *copystream, bool isbinary, PGresult **res)
|
|||||||
* This code erroneously assumes '\.' on a line alone
|
* This code erroneously assumes '\.' on a line alone
|
||||||
* inside a quoted CSV string terminates the \copy.
|
* inside a quoted CSV string terminates the \copy.
|
||||||
* http://www.postgresql.org/message-id/E1TdNVQ-0001ju-GO@wrigleys.postgresql.org
|
* http://www.postgresql.org/message-id/E1TdNVQ-0001ju-GO@wrigleys.postgresql.org
|
||||||
|
* https://www.postgresql.org/message-id/bfcd57e4-8f23-4c3e-a5db-2571d09208e2@beta.fastmail.com
|
||||||
*/
|
*/
|
||||||
if (strcmp(buf, "\\.\n") == 0 ||
|
if (strcmp(buf, "\\.\n") == 0 ||
|
||||||
strcmp(buf, "\\.\r\n") == 0)
|
strcmp(buf, "\\.\r\n") == 0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user