Skip to content

Commit

Permalink
Mise à jour de la traduction de extend.xml
Browse files Browse the repository at this point in the history
  • Loading branch information
Stéphane Lorek authored and gleu committed Jul 3, 2020
1 parent ca943bd commit 8a55588
Showing 1 changed file with 108 additions and 98 deletions.
206 changes: 108 additions & 98 deletions postgresql/extend.xml
Original file line number Diff line number Diff line change
Expand Up @@ -240,26 +240,27 @@
</indexterm>

<para>
Some pseudo-types of special interest are the <firstterm>polymorphic
types</firstterm>, which are used to declare <firstterm>polymorphic
functions</firstterm>. This powerful feature allows a single function
definition to operate on many different data types, with the specific
data type(s) being determined by the data types actually passed to it
in a particular call. The polymorphic types are shown in
<xref linkend="extend-types-polymorphic-table"/>. Some examples of
their use appear in <xref linkend="xfunc-sql-polymorphic-functions"/>.
Les pseudo-types ayant un intérêt particulier sont les <firstterm>types
polymorphiques</firstterm>, utilisés pour déclarer des
<firstterm>fonctions polymorphiques</firstterm>. Cette puissante
fonctionalité permet à une définition unique de fonction d'opérer sur
différents types de données, le type de données étant déterminé par le
type passé lors d'un appel donné. Les types polymorphiques sont indiqués
dans <xref linkend="extend-types-polymorphic-table"/>. Quelques exemples
de leurs usages apparaissent dans <xref
linkend="xfunc-sql-polymorphic-functions"/>.
</para>

<table id="extend-types-polymorphic-table">
<title>Polymorphic Types</title>
<title>Types polymorphiques</title>
<tgroup cols="3">
<colspec colname="col1" colwidth="2*"/>
<colspec colname="col2" colwidth="1*"/>
<colspec colname="col3" colwidth="2*"/>
<thead>
<row>
<entry>Name</entry>
<entry>Family</entry>
<entry>Nom</entry>
<entry>Famille</entry>
<entry>Description</entry>
</row>
</thead>
Expand All @@ -268,86 +269,92 @@
<row>
<entry><type>anyelement</type></entry>
<entry>Simple</entry>
<entry>Indicates that a function accepts any data type</entry>
<entry>Indique qu'une fonction accepte n'importe quel type de données</entry>
</row>

<row>
<entry><type>anyarray</type></entry>
<entry>Simple</entry>
<entry>Indicates that a function accepts any array data type</entry>
<entry>Indique qu'une fonction accepte n'importe quel type de données tableau.</entry>
</row>

<row>
<entry><type>anynonarray</type></entry>
<entry>Simple</entry>
<entry>Indicates that a function accepts any non-array data type</entry>
<entry>Indique qu'une fonction accepte n'importe quel type de données
qui n'est pas un tableau</entry>
</row>

<row>
<entry><type>anyenum</type></entry>
<entry>Simple</entry>
<entry>Indicates that a function accepts any enum data type
(see <xref linkend="datatype-enum"/>)
<entry>Indique que cette fonction accepte n'importe quel type de données enum
(voir <xref linkend="datatype-enum"/>)
</entry>
</row>

<row>
<entry><type>anyrange</type></entry>
<entry>Simple</entry>
<entry>Indicates that a function accepts any range data type
(see <xref linkend="rangetypes"/>)
<entry>Indique que cette fonction accepte n'importe quel type interval
(voir <xref linkend="rangetypes"/>)
</entry>
</row>

<row>
<entry><type>anycompatible</type></entry>
<entry>Common</entry>
<entry>Indicates that a function accepts any data type,
with automatic promotion of multiple arguments to a common data type
<entry>
Indique que la fonction accepte n'importe quel type de données, avec
promotion automatique d'arguments multiples en un type de données commun.
</entry>
</row>

<row>
<entry><type>anycompatiblearray</type></entry>
<entry>Common</entry>
<entry>Indicates that a function accepts any array data type,
with automatic promotion of multiple arguments to a common data type
<entry>
Indique que la fonction accepte n'importe quel type de données tableau, avec
promotion automatique d'arguments multiples en un type de données commun.
</entry>
</row>

<row>
<entry><type>anycompatiblenonarray</type></entry>
<entry>Common</entry>
<entry>Indicates that a function accepts any non-array data type,
with automatic promotion of multiple arguments to a common data type
<entry>
Indique que la fonction accepte n'importe quel type de données qui
n'est pas un tableau, avec promotion automatique d'arguments multiples
en un type de données commun.
</entry>
</row>

<row>
<entry><type>anycompatiblerange</type></entry>
<entry>Common</entry>
<entry>Indicates that a function accepts any range data type,
with automatic promotion of multiple arguments to a common data type
<entry>
Indique que la fonction accepte n'importe quel type de données interval, avec
promotion automatique d'arguments multiples en un type de données commun.
</entry>
</row>
</tbody>
</tgroup>
</table>

<para>
Les arguments et résultats polymorphes sont liés entre eux et
sont résolus dans un type de données spécifique quand une requête faisant
appel à une fonction polymorphe est analysée. When there is more than one
polymorphic argument, the actual
data types of the input values must match up as described below. If the
function's result type is polymorphic, or it has output parameters of
polymorphic types, the types of those results are deduced from the
actual types of the polymorphic inputs as described below.
Les arguments et résultats polymorphes sont liés entre eux et sont résolus
dans un type de données spécifique quand une requête faisant appel à une
fonction polymorphe est analysée. Quand il y a plus d'un argument
polymorphique, les types de données courants doivent correspondre comme
décrit ci-dessous. Si le type de résultat de la fonction est
polymorphique, or que ses arguments de sortie sont de types
polymorphiques, alors les types de ces résultats sont déduits par les
types polymorphiques en entrée présents comme décrit ci-dessous.
</para>

<para>
For the <quote>simple</quote> family of polymorphic types, the
matching and deduction rules work like this:
Pour les types polymorphiques de famille <quote>simple</quote>, la
correspondance et les règles de déduction fonctionnent ainsi&nbsp;:
</para>

<para>
Expand Down Expand Up @@ -425,56 +432,58 @@
</para>

<para>
For the <quote>common</quote> family of polymorphic types, the
matching and deduction rules work approximately the same as for
the <quote>simple</quote> family, with one major difference: the
actual types of the arguments need not be identical, so long as they
can be implicitly cast to a single common type. The common type is
selected following the same rules as for <literal>UNION</literal> and
related constructs (see <xref linkend="typeconv-union-case"/>).
Selection of the common type considers the actual types
of <type>anycompatible</type> and <type>anycompatiblenonarray</type>
inputs, the array element types of <type>anycompatiblearray</type>
inputs, and the range subtypes of <type>anycompatiblerange</type>
inputs. If <type>anycompatiblenonarray</type> is present then the
common type is required to be a non-array type. Once a common type is
identified, arguments in <type>anycompatible</type>
and <type>anycompatiblenonarray</type> positions are automatically
cast to that type, and arguments in <type>anycompatiblearray</type>
positions are automatically cast to the array type for that type.
Pour la famille de types polymorphiques <quote>common</quote>, la
correspondance et les règles de déduction fonctionnent presque pareilles
que pour la famille <quote>simple</quote>, avec une différence majeure&nbsp;:
les types courants des arguments n'ont pas besoin d'être identiques,
aussi longtemps qu'ils peuvent être implicitement convertis en un type commun simple.
Le type commun est sélectionné en suivant la même règle que pour <literal>UNION</literal>
et les constructions liées (voir <xref linkend="typeconv-union-case"/>).
La sélection du type commun considère les types présents
<type>anycompatible</type> et <type>anycompatiblenonarray</type> en entrée,
les éléments de type tableau <type>anycompatiblearray</type> en entrée, et
les sous-types intervals <type>anycompatiblerange</type> en entrée.
Si <type>anycompatiblenonarray</type> est présent, alors le type commun doit
être un type qui n'est pas un tableau. Une fois le type commun identifié, les arguments
en position <type>anycompatible</type> et <type>anycompatiblenonarray</type>
sont automatiquement convertis en ce type, et les arguments en position
<type>anycompatiblearray</type> sont automatiquement convertis en type tableau
pour ce type.

</para>

<para>
Since there is no way to select a range type knowing only its subtype,
use of <type>anycompatiblerange</type> requires that all arguments
declared with that type have the same actual range type, and that that
type's subtype agree with the selected common type, so that no casting
of the range values is required. As with <type>anyrange</type>, use
of <type>anycompatiblerange</type> as a function result type requires
that there be an <type>anycompatiblerange</type> argument.
Du fait qu'il n'y a pas de moyen de sélectionner le type interval à partir
uniquement de son sous-type, l'usage de <type>anycompatiblerange</type>
requiert que tous les arguments déclarés avec ce type aient le même type interval,
et que le type du sous-type est en accord avec le type commun sélectionné,
pour qu'il n'y ait pas de conversion nécessaire de la valeur de l'interval.
Comme avec <type>anyrange</type>, l'usage de <type>anycompatiblerange</type>
en tant que type de résultat de fonction demande qu'il y ait un
argument <type>anycompatiblerange</type>.
</para>

<para>
Notice that there is no <type>anycompatibleenum</type> type. Such a
type would not be very useful, since there normally are not any
implicit casts to enum types, meaning that there would be no way to
resolve a common type for dissimilar enum inputs.
Notez qu'il n'y a aucun type <type>anycompatibleenum</type>. Un tel
type ne serait pas très utile, du fait qu'il n'y a normalement aucune
conversion implicite de types enum, signifiant ainsi qu'il n'y aura aucune
façon de résoudre un type commun pour des entrées enum différentes.
</para>

<para>
The <quote>simple</quote> and <quote>common</quote> polymorphic
families represent two independent sets of type variables. Consider
for example
Les familles polymorphiques <quote>simple</quote> et <quote>common</quote>
représentent deux ensembles de types de variable indépendants. Considérez
par exemple&nbsp;:
<programlisting>
CREATE FUNCTION myfunc(a anyelement, b anyelement,
c anycompatible, d anycompatible)
RETURNS anycompatible AS ...
</programlisting>
In an actual call of this function, the first two inputs must have
exactly the same type. The last two inputs must be promotable to a
common type, but this type need not have anything to do with the type
of the first two inputs. The result will have the common type of the
last two inputs.
Dans un appel de cette fonction, les deux premières entrées doivent avoir
le même type exact. Les deux dernières entrées doivent être convertibles
en un type commun, mais ce type nécessite d'être complétement différent du type
des deux premières entrées. Le résultat aura le type commun des deux
dernières entrées.
</para>

<para>
Expand Down Expand Up @@ -759,9 +768,9 @@ RETURNS anycompatible AS ...
seuls les superutilisateurs pourront créer cet extension ou la mettre à jour.
Si ce paramètre est à <literal>false</literal>, seuls les droits nécessaires
seront requis pour installer ou mettre à jour l'extension.
This should normally be set to <literal>true</literal> if any of the
script commands require superuser privileges. (Such commands would
fail anyway, but it's more user-friendly to give the error up front.)
Ce paramètre devrait normalement être mis à <literal>true</literal> si au moins
une commandes du script nécessite les privilèges superuser. (Ces commandes
échoueront en tous cas, mais il est plus convivial de fournir une erreur en amont.)
</para>
</listitem>
</varlistentry>
Expand All @@ -770,20 +779,21 @@ RETURNS anycompatible AS ...
<term><varname>trusted</varname> (<type>boolean</type>)</term>
<listitem>
<para>
This parameter, if set to <literal>true</literal> (which is not the
default), allows some non-superusers to install an extension that
has <varname>superuser</varname> set to <literal>true</literal>.
Specifically, installation will be permitted for anyone who has
<literal>CREATE</literal> privilege on the current database.
When the user executing <command>CREATE EXTENSION</command> is not
a superuser but is allowed to install by virtue of this parameter,
then the installation or update script is run as the bootstrap
superuser, not as the calling user.
This parameter is irrelevant if <varname>superuser</varname> is
<literal>false</literal>.
Generally, this should not be set true for extensions that could
allow access to otherwise-superuser-only abilities, such as
filesystem access.
Ce paramètre, si mis à <literal>true</literal> (qui n'est pas le défaut),
permet à des utilisateurs standards, sans attribut <literal>SUPERUSER</literal>,
d'installer une extension qui a
<varname>superuser</varname> affecté à <literal>true</literal>.
Plus précisemment, l'installation sera permise pour toute personne
qui a le droit <literal>CREATE</literal> sur la base courante.
Si l'utilisateur qui exécute <command>CREATE EXTENSION</command> n'est
pas superutilisateur mais est autorisé à installer de part ce paramètre, alors
le script d'installation ou de mise à jour est exécuté comme bootstrap
superutilisateur, et non pas comme l'utilisateur appelant.
Ce paramètre n'as pas d'effet si <varname>superuser</varname> est
<literal>false</literal>.
En général, le paramètre ne doit pas être mis à <literal>true</literal> pour
les extensions qui peuvent autoriser des accès aux capacités réservées aux
superutilisateurs, telles que les accès au système de fichiers.
</para>
</listitem>
</varlistentry>
Expand Down Expand Up @@ -851,15 +861,15 @@ RETURNS anycompatible AS ...
</para>

<para>
If the extension script contains the
string <literal>@extowner@</literal>, that string is replaced with the
(suitably quoted) name of the user calling <command>CREATE
EXTENSION</command> or <command>ALTER EXTENSION</command>. Typically
this feature is used by extensions that are marked trusted to assign
ownership of selected objects to the calling user rather than the
bootstrap superuser. (One should be careful about doing so, however.
For example, assigning ownership of a C-language function to a
non-superuser would create a privilege escalation path for that user.)
Si le script d'extension contient la chaine <literal>@extowner@</literal>,
celle-ci est remplacé avec le nom (encadré de double apostrophe si nécessaire)
de l'utilisateur exécutant <command>CREATE
EXTENSION</command> ou <command>ALTER EXTENSION</command>. Habituellement,
cette fonctionalité est employée par les extensions notées de confiance pour
affecter l'appropriation des objets sélectionnés par l'utilisateur exécutant plutôt
que par le bootstrap superuser. (Il faut cependant être prudent avec cela. Par
exemple, affecter à une fonction en langage C un propriétaire non super-utilisateur
ouvre une voie pour une escalade de privilèges à cet utilisateur.)
</para>

<para>
Expand Down

0 comments on commit 8a55588

Please sign in to comment.