You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
——row89至119,调英和翻为:
<!--==========================orignal english content==========================
<para>
Many modules supply new user-defined functions, operators, or types.
To make use of one of these modules, after you have installed the code
you need to register the new SQL objects in the database system.
This is done by executing
a <xref linkend="sql-createextension"/> command. In a fresh database,
you can simply do
<programlisting>
CREATE EXTENSION <replaceable>module_name</replaceable>;
</programlisting>
This command registers the new SQL objects in the current database only,
so you need to run it in each database that you want
the module's facilities to be available in. Alternatively, run it in
database <literal>template1</literal> so that the extension will be copied into
subsequently-created databases by default.
</para>
____________________________________________________________________________-->
<para>
许多模块提供新的用户自定义函数、操作符或数据类型。在已经安装了代码之后,为了使用这些模块,需要在数据库系统中注册新的 SQL 对象。
可以通过执行一个<xref linkend="sql-createextension"/>命令来完成。在一个新的数据库中,你可以简单地
<programlisting>
CREATE EXTENSION <replaceable>module_name</replaceable>;
</programlisting>
这个命令把新的 SQL 对象注册在当前数据库中,因此你需要在每一个你希望使用该模块功能的数据库中执行他。
另外,可以在<literal>template1</literal>数据库中运行这个命令以便该扩展能被默认地复制到后续创建的数据库中。
</para>
——row120至135,增英和翻为:
<!--==========================orignal english content==========================
<para>
For all these modules, <command>CREATE EXTENSION</command> must be run
by a database superuser, unless the module is
considered <quote>trusted</quote>, in which case it can be run by any
user who has <literal>CREATE</literal> privilege on the current
database. Modules that are trusted are identified as such in the
sections that follow. Generally, trusted modules are ones that cannot
provide access to outside-the-database functionality.
</para>
____________________________________________________________________________-->
<para>
对于所有这些模块,<command>CREATE EXTENSION</command>必须由数据库超级用户运行,除非该模块被视为<quote>trusted</quote>,
在这种情况下,它可以由在当前数据库上具有<literal>CREATE</literal>特权的任何用户运行。
受信任的模块将在下面的章节中标识为这样的模块。通常,受信任的模块不能提供对数据库外部函数的访问。
</para>
——row149,删英和翻为:
<!--==========================orignal english content==========================
<para>
If your database was brought forward by dump and reload from a pre-9.1
version of <productname>PostgreSQL</productname>, and you had been using the pre-9.1
version of the module in it, you should instead do
<programlisting>
CREATE EXTENSION <replaceable>module_name</replaceable> FROM unpackaged;
</programlisting>
This will update the pre-9.1 objects of the module into a proper
<firstterm>extension</firstterm> object. Future updates to the module will be
managed by <xref linkend="sql-alterextension"/>.
For more information about extension updates, see
<xref linkend="extend-extensions"/>.
</para>
____________________________________________________________________________-->
<para>
如果你的数据库是从一个<productname>PostgreSQL</productname> 9.1 之前版本的转储载入而来,并且你已经在其中使用了一个 9.1 之前版本的该模块,你应该使用
<programlisting>
CREATE EXTENSION <replaceable>module_name</replaceable> FROM unpackaged;
</programlisting>
这会把该 9.1 之前的模块对象更新到一个正确的<firstterm>扩展</firstterm>对象。未来对该模块的更新将由<xref linkend="sql-alterextension"/>管理。更多关于扩展更新的信息,请见<xref linkend="extend-extensions"/>。
</para>
0 commit comments