Compare commits

..

No commits in common. "930bc76bec1021c9ab8c8cb41cc08d598c2e26d8" and "6e1cca5113487bb9ef4daa1bb2833c6333466410" have entirely different histories.

5 changed files with 10 additions and 27 deletions

View File

@ -207,12 +207,6 @@ createdb -O <replaceable>rolename</replaceable> <replaceable>dbname</replaceable
action being taken when those databases are created.
</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>
There is a second standard system database named
<literal>template0</literal>.<indexterm><primary>template0</primary></indexterm> This

View File

@ -137,11 +137,7 @@ REVOKE [ GRANT OPTION FOR ]
<listitem>
<para>
The name of an existing role of which the current role is a member.
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.
If <literal>FOR ROLE</literal> is omitted, the current role is assumed.
</para>
</listitem>
</varlistentry>

View File

@ -59,17 +59,15 @@ CREATE [ OR REPLACE ] RULE <replaceable class="parameter">name</replaceable> AS
</para>
<para>
Presently, <literal>ON SELECT</literal> rules can only be attached
to views. (Attaching one to a table converts the table into a view.)
Such a rule must be named <literal>"_RETURN"</literal>,
must be an unconditional <literal>INSTEAD</literal> rule, and must have
an action that consists of a single <command>SELECT</command> command.
This command defines the visible contents of the view. (The view
itself is basically a dummy table with no storage.) It's best to
regard such a rule as an implementation detail. While a view can be
redefined via <literal>CREATE OR REPLACE RULE "_RETURN" AS
...</literal>, it's better style to use <literal>CREATE OR REPLACE
VIEW</literal>.
Presently, <literal>ON SELECT</literal> rules must be unconditional
<literal>INSTEAD</literal> rules and must have actions that consist
of a single <command>SELECT</command> command. Thus, an
<literal>ON SELECT</literal> rule effectively turns the table into
a view, whose visible contents are the rows returned by the rule's
<command>SELECT</command> command rather than whatever had been
stored in the table (if anything). It is considered better style
to write a <command>CREATE VIEW</command> command than to create a
real table and define an <literal>ON SELECT</literal> rule for it.
</para>
<para>

View File

@ -1060,10 +1060,6 @@ testdb=&gt;
destination, because all data must pass through the client/server
connection. For large amounts of data the <acronym>SQL</acronym>
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>
</tip>

View File

@ -633,7 +633,6 @@ handleCopyIn(PGconn *conn, FILE *copystream, bool isbinary, PGresult **res)
* This code erroneously assumes '\.' on a line alone
* inside a quoted CSV string terminates the \copy.
* 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 ||
strcmp(buf, "\\.\r\n") == 0)