Skip to content

Commit

Permalink
Traduction de gist.xml
Browse files Browse the repository at this point in the history
  • Loading branch information
Stéphane Lorek authored and gleu committed Jul 24, 2020
1 parent bc1be1e commit 0be1e0d
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions postgresql/gist.xml
Original file line number Diff line number Diff line change
Expand Up @@ -306,9 +306,9 @@ CREATE INDEX ON ma_table USING GIST (ma_colonne_inet inet_ops);
<foreignphrase>nearest-neighbor</foreignphrase>). La neuvième méthode,
optionnelle, nommée <function>fetch</function>, est nécessaire si la classe
d'opérateur souhaite supporter les parcours d'index seuls, sauf quand la
méthode <function>compress</function> est omise. The optional tenth method
<function>options</function> is needed if the operator class provides
the user-specified parameters.
méthode <function>compress</function> est omise.
La dixième méthode, optionnelle, est <function>options</function> et est nécessaire
si l'opérateur de classe fournit des paramètres définis par l'utilisateur.
</para>

<variablelist>
Expand Down Expand Up @@ -1002,12 +1002,12 @@ my_fetch(PG_FUNCTION_ARGS)
<term><function>options</function></term>
<listitem>
<para>
Allows definition of user-visible parameters that control operator
class behavior.
Permet la définition des paramètres visibles par l'utilisateur et contrôlant
le comportement des classes d'opérateur.
</para>

<para>
The <acronym>SQL</acronym> declaration of the function must look like this:
La déclaration <acronym>SQL</acronym> de la fonction doit ressembler à ça&nbsp;:

<programlisting>
CREATE OR REPLACE FUNCTION my_options(internal)
Expand All @@ -1018,16 +1018,17 @@ LANGUAGE C STRICT;
</para>

<para>
The function is passed a pointer to a <replaceable>local_relopts</replaceable>
struct, which needs to be filled with a set of operator class
specific options. The options can be accessed from other support
functions using the <literal>PG_HAS_OPCLASS_OPTIONS()</literal> and
<literal>PG_GET_OPCLASS_OPTIONS()</literal> macros.
La fonction est passée sous forme de pointeur à une structure
<replaceable>local_relopts</replaceable>, qui doit être nécessairement alimentée
avec un ensemble d'options spécifiques de classe d'opérateur. Les options peuvent
être accédées par d'autres fonctions support en utilisant les macros
<literal>PG_HAS_OPCLASS_OPTIONS()</literal> et
<literal>PG_GET_OPCLASS_OPTIONS()</literal>.
</para>

<para>
An example implementation of my_options() and parameters use
from other support functions are given below:
Un exemple d'implémentation de my_options() et de l'utilisation des paramètres
depuis une autre fonction support est donné ci-dessous&nbsp;:

<programlisting>
typedef enum MyEnumType
Expand Down Expand Up @@ -1060,7 +1061,7 @@ static char *str_param_default = "default";
/*
* Sample validator: checks that string is not longer than 8 bytes.
*/
static void
static void
validate_my_string_relopt(const char *value)
{
if (strlen(value) > 8)
Expand All @@ -1072,7 +1073,7 @@ validate_my_string_relopt(const char *value)
/*
* Sample filler: switches characters to lower case.
*/
static Size
static Size
fill_my_string_relopt(const char *value, void *ptr)
{
char *tmp = str_tolower(value, strlen(value), DEFAULT_COLLATION_OID);
Expand Down Expand Up @@ -1101,7 +1102,7 @@ my_options(PG_FUNCTION_ARGS)
offsetof(MyOptionsStruct, real_param));
add_local_enum_reloption(relopts, "enum_param", "enum parameter",
myEnumValues, MY_ENUM_ON,
"Valid values are: \"on\", \"off\" and \"auto\".",
"Valid values are: \"on\", \"off\" et \"auto\".",
offsetof(MyOptionsStruct, enum_param));
add_local_string_reloption(relopts, "str_param", "string parameter",
str_param_default,
Expand Down Expand Up @@ -1145,10 +1146,9 @@ my_compress(PG_FUNCTION_ARGS)
</para>

<para>
Since the representation of the key in <acronym>GiST</acronym> is
flexible, it may depend on user-specified parameters. For instance,
the length of key signature may be specified. See
<literal>gtsvector_options()</literal> for example.
Comme la représentation de la clé dans <acronym>GiST</acronym> est
flexible, elle peut dépendre des paramètres définis par l'utilisateur.
Voir <literal>gtsvector_options()</literal> pour exemple.
</para>
</listitem>
</varlistentry>
Expand Down

0 comments on commit 0be1e0d

Please sign in to comment.