Skip to content

Commit

Permalink
Changements version 12 pour ALTER {DOMAIN, FOREIGN TABLE, FUNCTION, I…
Browse files Browse the repository at this point in the history
…NDEX, TYPE}
  • Loading branch information
dverite committed Jul 22, 2019
1 parent 471b9c2 commit 31a45b7
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 50 deletions.
28 changes: 16 additions & 12 deletions postgresql/ref/alter_domain.xml
Original file line number Diff line number Diff line change
Expand Up @@ -284,18 +284,22 @@ ALTER DOMAIN <replaceable class="PARAMETER">nom</replaceable>
<title>Notes</title>

<para>
Although <command>ALTER DOMAIN ADD CONSTRAINT</command> attempts to verify
that existing stored data satisfies the new constraint, this check is not
bulletproof, because the command cannot <quote>see</quote> table rows that
are newly inserted or updated and not yet committed. If there is a hazard
that concurrent operations might insert bad data, the way to proceed is to
add the constraint using the <literal>NOT VALID</literal> option, commit
that command, wait until all transactions started before that commit have
finished, and then issue <command>ALTER DOMAIN VALIDATE
CONSTRAINT</command> to search for data violating the constraint. This
method is reliable because once the constraint is committed, all new
transactions are guaranteed to enforce it against new values of the domain
type.
Bien que <command>ALTER DOMAIN ADD CONSTRAINT</command> essaie de vérifier
que les données existantes satisfont la nouvelle contrainte,
le test n'est pas absolu, parce que la commande ne peut pas <quote>voir</quote>
les lignes de la table qui sont nouvellement insérées ou mises à jour et
dont la transaction n'est pas encore validée. S'il y a un risque
que des opérations concurrentes puissent insérer des données ne
satisfaisant pas la contrainte, la manière de procéder consiste à
ajouter la contrainte avec l'option <literal>NOT VALID</literal>,
valider (commit) cette commande, attendre jusqu'à ce que toutes les
transactions démarrées avant cette validation aient fini, et alors
exécuter <command>ALTER DOMAIN VALIDATE CONSTRAINT</command> pour
chercher les données qui violeraient la contrainte. Cette méthode
est fiable parce qu'une fois que la création de contrainte a fait
l'objet d'un commit, il est garanti que les nouvelles transactions
sont soumises à cette contrainte pour toute nouvelle valeur du type
domaine.
</para>

<para>
Expand Down
47 changes: 24 additions & 23 deletions postgresql/ref/alter_foreign_table.xml
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ ALTER FOREIGN TABLE [ IF EXISTS ] <replaceable class="parameter">nom</replaceabl
<term><literal>DROP CONSTRAINT [ IF EXISTS ]</literal></term>
<listitem>
<para>
Cette clause supprime le contrainte indiquée sur la table distante. Si
Cette clause supprime la contrainte indiquée sur la table distante. Si
la clause <literal>IF EXISTS</literal> est précisée et que la contrainte
n'existe pas, aucune erreur n'est renvoyée mais un message d'information
apparait.
Expand All @@ -222,9 +222,10 @@ ALTER FOREIGN TABLE [ IF EXISTS ] <replaceable class="parameter">nom</replaceabl
<term><literal>SET WITHOUT OIDS</literal></term>
<listitem>
<para>
Backward compatibility syntax for removing the <literal>oid</literal>
system column. As oid system columns cannot be added anymore, this never
has an effect.
Procure une compatibilité de syntaxe dans le cadre de la
suppression de la colonne système <literal>oid</literal>. Comme
les colonnes système oid ne peuvent plus être ajoutées, cela n'a
aucun effet.
</para>
</listitem>
</varlistentry>
Expand All @@ -233,10 +234,10 @@ ALTER FOREIGN TABLE [ IF EXISTS ] <replaceable class="parameter">nom</replaceabl
<term><literal>INHERIT <replaceable class="parameter">parent_table</replaceable></literal></term>
<listitem>
<para>
This form adds the target foreign table as a new child of the specified
parent table.
See the similar form of <xref linkend="sql-altertable"/>
for more details.
Cette forme ajoute la table distante cible comme nouvel enfant
de la table parente spécifiée.
Pour plus de détails, voir la forme similaire dans
<xref linkend="sql-altertable"/>.
</para>
</listitem>
</varlistentry>
Expand All @@ -245,8 +246,8 @@ ALTER FOREIGN TABLE [ IF EXISTS ] <replaceable class="parameter">nom</replaceabl
<term><literal>NO INHERIT <replaceable class="parameter">parent_table</replaceable></literal></term>
<listitem>
<para>
This form removes the target foreign table from the list of children of
the specified parent table.
Cette forme supprime la table cible distante de la liste des enfants
de la table parente spécifiée.
</para>
</listitem>
</varlistentry>
Expand Down Expand Up @@ -313,9 +314,9 @@ ALTER FOREIGN TABLE [ IF EXISTS ] <replaceable class="parameter">nom</replaceabl
</para>

<para>
If the command is written as <literal>ALTER FOREIGN TABLE IF EXISTS ...</literal>
and the foreign table does not exist, no error is thrown. A notice is
issued in this case.
Si la commande est écrite avec <literal>ALTER FOREIGN TABLE IF EXISTS ...</literal>
et que la table distante n'existe pas, aucune erreur n'est émise. Un message
d'attention est émis dans ce cas.
</para>

<para>
Expand Down Expand Up @@ -343,12 +344,12 @@ ALTER FOREIGN TABLE [ IF EXISTS ] <replaceable class="parameter">nom</replaceabl
<term><replaceable class="parameter">nom</replaceable></term>
<listitem>
<para>
The name (possibly schema-qualified) of an existing foreign table to
alter. If <literal>ONLY</literal> is specified before the table name, only
that table is altered. If <literal>ONLY</literal> is not specified, the table
and all its descendant tables (if any) are altered. Optionally,
<literal>*</literal> can be specified after the table name to explicitly
indicate that descendant tables are included.
Le nom (éventuellement qualifié du nom du schéma) de la table à modifier.
Si <literal>ONLY</literal> est spécifié avant le nom de la table,
la table seule est modifiée. Si <literal>ONLY</literal> n'est pas spécifié,
la table et toutes ses tables filles (s'il y en a) sont modifiées.
Optionnellement, <literal>*</literal> peut être spécifié après le nom
de la table pour indiquer explicitement que les tables filles sont incluses.
</para>
</listitem>
</varlistentry>
Expand Down Expand Up @@ -394,7 +395,7 @@ ALTER FOREIGN TABLE [ IF EXISTS ] <replaceable class="parameter">nom</replaceabl
<term><replaceable class="parameter">table_constraint</replaceable></term>
<listitem>
<para>
New table constraint for the foreign table.
Nouvelle contrainte au niveau table pour la table distante.
</para>
</listitem>
</varlistentry>
Expand All @@ -403,7 +404,7 @@ ALTER FOREIGN TABLE [ IF EXISTS ] <replaceable class="parameter">nom</replaceabl
<term><replaceable class="parameter">constraint_name</replaceable></term>
<listitem>
<para>
Name of an existing constraint to drop.
Nom d'une contrainte existante à supprimer.
</para>
</listitem>
</varlistentry>
Expand Down Expand Up @@ -465,7 +466,7 @@ ALTER FOREIGN TABLE [ IF EXISTS ] <replaceable class="parameter">nom</replaceabl
<term><replaceable class="parameter">parent_table</replaceable></term>
<listitem>
<para>
A parent table to associate or de-associate with this foreign table.
Une table parente à associer ou dissocier de cette table distante.
</para>
</listitem>
</varlistentry>
Expand Down Expand Up @@ -554,7 +555,7 @@ ALTER FOREIGN TABLE mon_schema.distributeurs OPTIONS (ADD opt1 'valeur', SET opt
</refsect1>

<refsect1>
<title>See Also</title>
<title>Voir aussi</title>

<simplelist type="inline">
<member><xref linkend="sql-createforeigntable"/></member>
Expand Down
12 changes: 6 additions & 6 deletions postgresql/ref/alter_function.xml
Original file line number Diff line number Diff line change
Expand Up @@ -261,15 +261,15 @@ ALTER FUNCTION <replaceable>nom</replaceable> [ ( [ [ <replaceable class="parame

<listitem>
<para>
Set or change the planner support function to use for this function.
See <xref linkend="xfunc-optimization"/> for details. You must be
superuser to use this option.
Fournit une fonction de support de planification utilisable pour cette fonction.
Voir <xref linkend="xfunc-optimization"/> pour plus d'informations.
Il faut être superutilisateur pour utiliser cette option.
</para>

<para>
This option cannot be used to remove the support function altogether,
since it must name a new support function. Use <command>CREATE OR
REPLACE FUNCTION</command> if you need to do that.
Cette option ne peut pas être utilisée pour supprimer la fonction de support,
parce qu'elle doit indiquer une nouvelle fonction de support. Si vous avez besoin
de faire cela, utilisez <command>CREATE OR REPLACE FUNCTION</command>.
</para>
</listitem>
</varlistentry>
Expand Down
13 changes: 7 additions & 6 deletions postgresql/ref/alter_index.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,11 @@ ALTER INDEX ALL IN TABLESPACE <replaceable class="parameter">nom</replaceable> [

<para>
<command>ALTER INDEX</command> modifie la définition d'un index.
There are several subforms described below. Note that the lock level required
may differ for each subform. An <literal>ACCESS EXCLUSIVE</literal> lock is held
unless explicitly noted. When multiple subcommands are listed, the lock
held will be the strictest one required from any subcommand.
Il y a plusieurs variantes décrites ci-dessous. Notez que le niveau de verrouillage
requis peut différer entre chaque. Un verrou de niveau <literal>ACCESS EXCLUSIVE</literal>
est pris, sauf exception dûment précisée. Lorsque plusieurs sous-commandes
sont listées, le verrou pris sera le plus strict de l'ensemble des
sous-commandes.

<variablelist>

Expand All @@ -59,8 +60,8 @@ ALTER INDEX ALL IN TABLESPACE <replaceable class="parameter">nom</replaceable> [
Cela n'a aucun effet sur les données stockées.
</para>
<para>
Renaming an index acquires a <literal>SHARE UPDATE EXCLUSIVE</literal>
lock.
Le renommage d'index acquiert un verrou de niveau
<literal>SHARE UPDATE EXCLUSIVE</literal>.
</para>
</listitem>
</varlistentry>
Expand Down
7 changes: 4 additions & 3 deletions postgresql/ref/alter_type.xml
Original file line number Diff line number Diff line change
Expand Up @@ -291,9 +291,10 @@ ALTER TYPE <replaceable class="PARAMETER">nom</replaceable> RENAME VALUE <replac
<title>Notes</title>

<para>
If <command>ALTER TYPE ... ADD VALUE</command> (the form that adds a new
value to an enum type) is executed inside a transaction block, the new
value cannot be used until after the transaction has been committed.
Si <command>ALTER TYPE ... ADD VALUE</command> (la forme qui ajoute une
nouvelle valeur à un type énuméré) est exécuté à l'intérieur d'un bloc
transactionnel, la nouvelle valeur ne peut être utilisée qu'à partir
d'après la validation de la transaction.
</para>

<para>
Expand Down

0 comments on commit 31a45b7

Please sign in to comment.