Skip to content

Commit

Permalink
Traduction de ltree
Browse files Browse the repository at this point in the history
  • Loading branch information
gleu committed Sep 4, 2020
1 parent 50b8e4d commit cf973fc
Showing 1 changed file with 73 additions and 77 deletions.
150 changes: 73 additions & 77 deletions postgresql/ltree.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@
</para>

<para>
This module is considered <quote>trusted</quote>, that is, it can be
installed by non-superusers who have <literal>CREATE</literal> privilege
on the current database.
Ce module est considéré comme <quote>trusted</quote>, ce qui signifie qu'il
peut être installé par des utilisateurs simples (sans attribut
<literal>SUPERUSER</literal>) et qui ont l'attribut <literal>CREATE</literal>
sur la base de données courante.
</para>

<sect2>
Expand Down Expand Up @@ -67,8 +68,9 @@
pour la correspondance de valeurs de type <type>ltree</type>. Un mot
simple établit une correspondance avec ce label dans un chemin. Le
caractère joker (<literal>*</literal>) est utilisé pour spécifier tout
nombre de labels (niveaux). These can be joined with dots to form a pattern that
must match the whole label path. Par exemple&nbsp;:
nombre de labels (niveaux). Ils peuvent être liés avec des points
pour former des motifs qui doivent correspondre au chemin entier
du label. Par exemple&nbsp;:
<synopsis>
foo <lineannotation>Correspond au chemin exact <literal>foo</literal></lineannotation>
*.foo.* <lineannotation>Correspond à tout chemin contenant le label <literal>foo</literal></lineannotation>
Expand All @@ -84,15 +86,14 @@ foo <lineannotation>Correspond au chemin exact <literal>foo</literal></l
*{<replaceable>n</replaceable>} <lineannotation>Correspond à exactement <replaceable>n</replaceable> labels</lineannotation>
*{<replaceable>n</replaceable>,} <lineannotation>Correspond à au moins <replaceable>n</replaceable> labels</lineannotation>
*{<replaceable>n</replaceable>,<replaceable>m</replaceable>} <lineannotation>Correspond à au moins <replaceable>n</replaceable> labels mais à pas plus de <replaceable>m</replaceable></lineannotation>
*{,<replaceable>m</replaceable>} <lineannotation>Match at most <replaceable>m</replaceable> labels &mdash; same as </lineannotation>*{0,<replaceable>m</replaceable>}
foo{<replaceable>n</replaceable>,<replaceable>m</replaceable>} <lineannotation>Match at least <replaceable>n</replaceable> but not more than <replaceable>m</replaceable> occurrences of <literal>foo</literal></lineannotation>
foo{,} <lineannotation>Match any number of occurrences of <literal>foo</literal>, including zero</lineannotation>
*{,<replaceable>m</replaceable>} <lineannotation>Correspond à au moins <replaceable>m</replaceable> labels &mdash; identiques à </lineannotation>*{0,<replaceable>m</replaceable>}
foo{<replaceable>n</replaceable>,<replaceable>m</replaceable>} <lineannotation>Correspond à au moins <replaceable>n</replaceable> mais pas plus que <replaceable>m</replaceable> occurrences de <literal>foo</literal></lineannotation>
foo{,} <lineannotation>Correspond à n'importe quel nombre d'occurrences de <literal>foo</literal>, incluant zéro</lineannotation>
</synopsis>
In the absence of any explicit quantifier, the default for a star symbol
is to match any number of labels (that is, <literal>{,}</literal>) while
the default for a non-star item is to match exactly once (that
is, <literal>{1}</literal>).

En absence d'un quantificateur explicite, le défaut pour un symbole étoile
est de correspondre à n'importe quel nombre de labels (c'est-à-dire <literal>{,}</literal>)
tandis que le défaut pour un élément non-étoile est qu'il doit correspondre exactement
une fois (c'est-à-dire <literal>{1}</literal>).
</para>

<para>
Expand All @@ -116,13 +117,14 @@ foo{,} <lineannotation>Match any number of occurrences of <literal>foo</lit
</para>

<para>
Also, you can write several possibly-modified non-star items separated with
<literal>|</literal> (OR) to match any of those items, and you can put
<literal>!</literal> (NOT) at the start of a non-star group to match any
label that doesn't match any of the alternatives. A quantifier, if any,
goes at the end of the group; it means some number of matches for the
group as a whole (that is, some number of labels matching or not matching
any of the alternatives).
Vous pouvez aussi écrire de nombreux éléments non-étoiles, modifiés ou non, séparés avec
<literal>|</literal> (OR) pour correspondre à au moins un de ces éléments, et
vous pouvez mettre un <literal>!</literal> (NOT) au début d'un groupe non-étoile
pour correspondre à tout label qui ne correspond à aucune alternative.
Un quantificateur, s'il y a, va toujours à la fin du groupe&nbsp;; cela signifie
un certain nombre de correspondances pour le groupe entier (c'est-à-dire,
un certain nombre de labels correspondants ou non correspondants à n'importe quelle
alternative.)
</para>

<para>
Expand Down Expand Up @@ -152,8 +154,8 @@ a. b. c. d. e.
</listitem>
<listitem>
<para>
then has one or more labels, none of which
match <literal>football</literal> nor <literal>tennis</literal>
puis un ou plusieurs labels, dont aucun ne correspond ni à
<literal>football</literal> ni à <literal>tennis</literal>
</para>
</listitem>
<listitem>
Expand Down Expand Up @@ -467,13 +469,13 @@ a. b. c. d. e.
<thead>
<row>
<entry role="func_table_entry"><para role="func_signature">
Function
Fonction
</para>
<para>
Description
</para>
<para>
Example(s)
Exemple(s)
</para></entry>
</row>
</thead>
Expand All @@ -486,9 +488,9 @@ a. b. c. d. e.
<returnvalue>ltree</returnvalue>
</para>
<para>
Returns subpath of <type>ltree</type> from
position <parameter>start</parameter> to
position <parameter>end</parameter>-1 (counting from 0).
Retourne le sous-chemin du <type>ltree</type> à partir de la position
<parameter>start</parameter> jusqu'à la position <parameter>end</parameter>-1
(comptée à partir de 0).
</para>
<para>
<literal>subltree('Top.Child1.Child2',1,2)</literal>
Expand All @@ -503,12 +505,12 @@ a. b. c. d. e.
<returnvalue>ltree</returnvalue>
</para>
<para>
Returns subpath of <type>ltree</type> starting at
position <parameter>offset</parameter>, with
length <parameter>len</parameter>. If <parameter>offset</parameter>
is negative, subpath starts that far from the end of the path.
If <parameter>len</parameter> is negative, leaves that many labels off
the end of the path.
Retourne le sous-ensemble du <type>ltree</type> en commençant à
la position <parameter>offset</parameter>, avec une longueur <parameter>len</parameter>.
Si <parameter>offset</parameter> est négatif, le sous-ensemble débute depuis
la fin de chemin et s'étend vers le début.
Si <parameter>len</parameter> est négatif, cela élimine ce nombre (en valeur absolue)
de labels depuis la fin du chemin.
</para>
<para>
<literal>subpath('Top.Child1.Child2',0,2)</literal>
Expand All @@ -522,10 +524,10 @@ a. b. c. d. e.
<returnvalue>ltree</returnvalue>
</para>
<para>
Returns subpath of <type>ltree</type> starting at
position <parameter>offset</parameter>, extending to end of path.
If <parameter>offset</parameter> is negative, subpath starts that far
from the end of the path.
Retourne le sous-ensemble du <type>ltree</type> en commençant à
la position <parameter>offset</parameter>, avec une longueur <parameter>len</parameter>.
Si <parameter>offset</parameter> est négatif, le sous-ensemble débute depuis
la fin de chemin et s'étend vers le début.
</para>
<para>
<literal>subpath('Top.Child1.Child2',1)</literal>
Expand All @@ -540,7 +542,7 @@ a. b. c. d. e.
<returnvalue>integer</returnvalue>
</para>
<para>
Returns number of labels in path.
Retourne le nombre de label dans le chemin.
</para>
<para>
<literal>nlevel('Top.Child1.Child2')</literal>
Expand All @@ -555,8 +557,8 @@ a. b. c. d. e.
<returnvalue>integer</returnvalue>
</para>
<para>
Returns position of first occurrence of <parameter>b</parameter> in
<parameter>a</parameter>, or -1 if not found.
Retourne la position de la première occurence de <parameter>b</parameter>
dans <parameter>a</parameter>, ou -1 si non trouvé.
</para>
<para>
<literal>index('0.1.2.3.5.4.5.6.8.5.6.8','5.6')</literal>
Expand All @@ -570,11 +572,10 @@ a. b. c. d. e.
<returnvalue>integer</returnvalue>
</para>
<para>
Returns position of first occurrence of <parameter>b</parameter>
in <parameter>a</parameter>, or -1 if not found. The search starts at
position <parameter>offset</parameter>;
negative <parameter>offset</parameter> means
start <parameter>-offset</parameter> labels from the end of the path.
Retourne la position de la première occurence de <parameter>b</parameter>
dans <parameter>a</parameter>, ou -1 si non trouvé. La recherche débute à
la position <parameter>offset</parameter>&nbsp;; un <parameter>offset</parameter> négatif
indique un départ à <parameter>-offset</parameter> label depuis la fin du chemin.
</para>
<para>
<literal>index('0.1.2.3.5.4.5.6.8.5.6.8','5.6',-4)</literal>
Expand All @@ -589,7 +590,7 @@ a. b. c. d. e.
<returnvalue>ltree</returnvalue>
</para>
<para>
Casts <type>text</type> to <type>ltree</type>.
Convertit un <type>text</type> en <type>ltree</type>.
</para></entry>
</row>

Expand All @@ -600,7 +601,7 @@ a. b. c. d. e.
<returnvalue>text</returnvalue>
</para>
<para>
Casts <type>ltree</type> to <type>text</type>.
Convertit un <type>ltree</type> en <type>text</type>.
</para></entry>
</row>

Expand All @@ -611,8 +612,8 @@ a. b. c. d. e.
<returnvalue>ltree</returnvalue>
</para>
<para>
Computes longest common ancestor of paths
(up to 8 arguments are supported).
Calcule le plus long ancêtre commun des chemins.
(8 arguments sont supportés au maximum).
</para>
<para>
<literal>lca('1.2.3','1.2.3.4.5.6')</literal>
Expand All @@ -626,7 +627,7 @@ a. b. c. d. e.
<returnvalue>ltree</returnvalue>
</para>
<para>
Computes longest common ancestor of paths in array.
Calcule le plus long ancêtre commun des chemins dans un tableau.
</para>
<para>
<literal>lca(array['1.2.3'::ltree,'1.2.3.4'])</literal>
Expand Down Expand Up @@ -655,50 +656,54 @@ a. b. c. d. e.
</listitem>
<listitem>
<para>
Index GiST sur <type>ltree</type> (<literal>gist_ltree_ops</literal>
opclass)&nbsp;:
Index GiST sur <type>ltree</type> (classe d'opérateur
<literal>gist_ltree_ops</literal>)&nbsp;:
<literal>&lt;</literal>, <literal>&lt;=</literal>, <literal>=</literal>,
<literal>&gt;=</literal>, <literal>&gt;</literal>,
<literal>@&gt;</literal>, <literal>&lt;@</literal>,
<literal>@</literal>, <literal>~</literal>, <literal>?</literal>
</para>
<para>
<literal>gist_ltree_ops</literal> GiST opclass approximates a set of
path labels as a bitmap signature. Its optional integer parameter
<literal>siglen</literal> determines the
signature length in bytes. The default signature length is 8 bytes.
Valid values of signature length are between 1 and 2024 bytes. Longer
signatures lead to a more precise search (scanning a smaller fraction of the index and
fewer heap pages), at the cost of a larger index.
La classe d'opérateur GiST <literal>gist_ltree_ops</literal> effectue une
approximation sur un ensemble de chemins de labels sous format de
signature bitmap. La taille de la signature par défaut est 8 octets. Les
valeurs valides de taille de signature sont entre 1 et 2024 octets.
Des tailles de signatures plus longues permettent une recherche plus précise (en
parcourant une fraction plus petite de l'index et moins de pages heap), au coût
d'un plus large index.
</para>
<para>
Example of creating such an index with the default signature length of 8 bytes:
Exemple de création d'un tel index avec une taille de signature par défaut
de 8 octets&nbsp;:
</para>
<programlisting>
CREATE INDEX path_gist_idx ON test USING GIST (path);
</programlisting>
<para>
Example of creating such an index with a signature length of 100 bytes:
Exemple de création d'un tel index avec une taille de signature de 100
octets&nbsp;:
</para>
<programlisting>
CREATE INDEX path_gist_idx ON test USING GIST (path gist_ltree_ops(siglen=100));
</programlisting>
</listitem>
<listitem>
<para>
Index GiST sur <type>ltree[]</type> (<literal>gist__ltree_ops</literal>
opclass)&nbsp;:
Index GiST sur <type>ltree[]</type> (classe d'opérateur
<literal>gist__ltree_ops</literal>&nbsp;:
<literal>ltree[] &lt;@ ltree</literal>, <literal>ltree @&gt; ltree[]</literal>,
<literal>@</literal>, <literal>~</literal>, <literal>?</literal>
</para>
<para>
<literal>gist__ltree_ops</literal> GiST opclass works similarly to
<literal>gist_ltree_ops</literal> and also takes signature length as
a parameter. The default value of <literal>siglen</literal> in
<literal>gist__ltree_ops</literal> is 28 bytes.
La classe d'opérateur GiST <literal>gist__ltree_ops</literal> fonctionne
de façon similaire à <literal>gist_ltree_ops</literal> et aussi prend
une taille de signature en paramètre. La valeur par défaut de
<literal>siglen</literal> dans <literal>gist__ltree_ops</literal> est 28
octets.
</para>
<para>
Example of creating such an index with the default signature length of 28 bytes:
Exemple de création d'un tel index avec la taille de signature par défaut
de 28 octets&nbsp;:
</para>
<programlisting>
CREATE INDEX path_gist_idx ON test USING GIST (array_path);
Expand Down Expand Up @@ -862,15 +867,6 @@ ltreetest=&gt; SELECT ins_label(path,2,'Space') FROM test WHERE path &lt;@ 'Top.
la création d'une fonction, les valeurs <type>ltree</type> sont converties
en listes Python. Il est à noter que l'inverse n'est pas encore supportée.
</para>

<caution>
<para>
Il est fortement recommandé que les extensions de transformation soient
installées dans le même schéma que <filename>ltree</filename>. Sinon il
existe un risque de sécurité si le schéma de l'extension de transformation
contient des objets définis par un utilisateur hostile.
</para>
</caution>
</sect2>

<sect2>
Expand Down

0 comments on commit cf973fc

Please sign in to comment.