Skip to content

Commit

Permalink
Translate create_publication.xml
Browse files Browse the repository at this point in the history
  • Loading branch information
rjuju authored and gleu committed Jun 16, 2017
1 parent 085ac52 commit 98924e8
Showing 1 changed file with 74 additions and 66 deletions.
140 changes: 74 additions & 66 deletions postgresql/ref/create_publication.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,20 @@ PostgreSQL documentation
<refmeta>
<refentrytitle>CREATE PUBLICATION</refentrytitle>
<manvolnum>7</manvolnum>
<refmiscinfo>SQL - Language Statements</refmiscinfo>
<refmiscinfo>SQL - Ordres du langage</refmiscinfo>
</refmeta>

<refnamediv>
<refname>CREATE PUBLICATION</refname>
<refpurpose>define a new publication</refpurpose>
<refpurpose>définir une nouvelle publication</refpurpose>
</refnamediv>

<refsynopsisdiv>
<synopsis>
CREATE PUBLICATION <replaceable class="parameter">name</replaceable>
[ FOR TABLE [ ONLY ] <replaceable class="parameter">table_name</replaceable> [ * ] [, ...]
CREATE PUBLICATION <replaceable class="parameter">nom</replaceable>
[ FOR TABLE [ ONLY ] <replaceable class="parameter">nom_table</replaceable> [ * ] [, ...]
| FOR ALL TABLES ]
[ WITH ( <replaceable class="parameter">publication_parameter</replaceable> [= <replaceable class="parameter">value</replaceable>] [, ... ] ) ]
[ WITH ( <replaceable class="parameter">parametre_publication</replaceable> [= <replaceable class="parameter">valeur</replaceable>] [, ... ] ) ]

</synopsis>
</refsynopsisdiv>
Expand All @@ -34,28 +34,29 @@ CREATE PUBLICATION <replaceable class="parameter">name</replaceable>
<title>Description</title>

<para>
<command>CREATE PUBLICATION</command> adds a new publication
into the current database. The publication name must be distinct from
the name of any existing publication in the current database.
<command>CREATE PUBLICATION</command> ajoute une nouvelle publication dans
la base courante. Le nom de la publication doit être différent du nom de
toutes les autres publications existante au sein de la base courante.
</para>

<para>
A publication is essentially a group of tables whose data changes are
intended to be replicated through logical replication. See
<xref linkend="logical-replication-publication"/> for details about how
publications fit into the logical replication setup.
Une publication est essentiellement un groupe de table dont les changement
de données sont destinés à être répliqué grâce à la réplication logique.
Voir <xref linkend="logical-replication-publication"/> pour les détails de
comment les publications participent à la mise en place de la réplication
logique.
</para>
</refsect1>

<refsect1>
<title>Parameters</title>
<title>Paramètres</title>

<variablelist>
<varlistentry>
<term><replaceable class="parameter">name</replaceable></term>
<term><replaceable class="parameter">nom</replaceable></term>
<listitem>
<para>
The name of the new publication.
Le nom de la nouvelle publication.
</para>
</listitem>
</varlistentry>
Expand All @@ -64,19 +65,21 @@ CREATE PUBLICATION <replaceable class="parameter">name</replaceable>
<term><literal>FOR TABLE</literal></term>
<listitem>
<para>
Specifies a list of tables to add to the publication. If
<literal>ONLY</literal> is specified before the table name, only
that table is added to the publication. If <literal>ONLY</literal> is not
specified, the table and all its descendant tables (if any) are added.
Optionally, <literal>*</literal> can be specified after the table name to
explicitly indicate that descendant tables are included.
Spécifie une liste de tables à ajouter à la publication. Si
<literal>ONLY</literal> est spécifié avant le nom de la table, seul cette
table est ajoutée à la publication. Si <literal>ONLY</literal> n'est
pas spécifié, la table ainsi que toutes les tables descendantes (s'il y
en a) est ajoutées. De manière facultative, <literal>*</literal> peut
être spécifié après le nom de la table pour indiquer explicitement que
les tables descendantes doivent être incluses.
</para>

<para>
Only persistent base tables can be part of a publication. Temporary
tables, unlogged tables, foreign tables, materialized views, regular
views, and partitioned tables cannot be part of a publication. To
replicate a partitioned table, add the individual partitions to the
Seules les tables persistentes peuvent faire partie d'une publication.
Les tables temporaires, tables non journalisées, tables distantes, vues
matérialisées, vues standard ainsi que les tables partitionnées ne
peuvent pas faire partie d'une publication. Pour répliquer une table
partitionnée, il faut ajouter chaque partition individuellement à la
publication.
</para>
</listitem>
Expand All @@ -86,30 +89,31 @@ CREATE PUBLICATION <replaceable class="parameter">name</replaceable>
<term><literal>FOR ALL TABLES</literal></term>
<listitem>
<para>
Marks the publication as one that replicates changes for all tables in
the database, including tables created in the future.
Marque la publication comme publication qui réplique les changement pour
toutes les tables de la base, en incluant les tables qui seront crées
dans le futur.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><literal>WITH ( <replaceable class="parameter">publication_parameter</replaceable> [= <replaceable class="parameter">value</replaceable>] [, ... ] )</literal></term>
<term><literal>WITH ( <replaceable class="parameter">parametre_publication</replaceable> [= <replaceable class="parameter">valeur</replaceable>] [, ... ] )</literal></term>
<listitem>
<para>
This clause specifies optional parameters for a publication. The
following parameters are supported:
Cette clause spécifique les paramètres facultatifs d'une publication.
Les paramètres suivants sont supportés :

<variablelist>
<varlistentry>
<term><literal>publish</literal> (<type>string</type>)</term>
<listitem>
<para>
This parameter determines which DML operations will be published by
the new publication to the subscribers. The value is
comma-separated list of operations. The allowed operations are
<literal>insert</literal>, <literal>update</literal>, and
<literal>delete</literal>. The default is to publish all actions,
and so the default value for this option is
Ce paramètre détermine quelles opération DML seront publiées par la
nouvelle publication aux souscripteurs. Le contenu est une liste
d'opération séparé par des virgules. Les opérations autorisées sont
<literal>insert</literal>, <literal>update</literal> et
<literal>delete</literal>. Par défaut toutes les actions sont
publiées, et donc la valeur par défaut pour cette option est
<literal>'insert, update, delete'</literal>.
</para>
</listitem>
Expand All @@ -127,68 +131,72 @@ CREATE PUBLICATION <replaceable class="parameter">name</replaceable>
<title>Notes</title>

<para>
If neither <literal>FOR TABLE</literal> nor <literal>FOR ALL
TABLES</literal> is specified, then the publication starts out with an
empty set of tables. That is useful if tables are to be added later.
Si ni <literal>FOR TABLE</literal> ni <literal>FOR ALL
TABLES</literal> n'est spécifié, alors la publication commence avec un
ensemble de tables vide. C'est utile si des tables doivent être ajoutée
ultérieurement.
</para>

<para>
The creation of a publication does not start replication. It only defines
a grouping and filtering logic for future subscribers.
La création d'une publication ne démarre pas la réplication. Cela définit
uniquement un regroupement ainsi qu'un filtre logique pour les futurs
souscripteurs.
</para>

<para>
To create a publication, the invoking user must have the
<literal>CREATE</literal> privilege for the current database.
(Of course, superusers bypass this check.)
Pour créer une publication, l'utilisateur lançant la commande doit avec le
privilège <literal>CREATE</literal> pour la base de données courante.
(Bien entendu, les superutilisateurs coutournent cette vérification.)
</para>

<para>
To add a table to a publication, the invoking user must have ownership
rights on the table. The <command>FOR ALL TABLES</command> clause requires
the invoking user to be a superuser.
Pour ajouter une table à une publication, l'utilisateur lançant la commande
doit avoir les droits de propriétaire de la table. La clause <command>FOR
ALL TABLES</command> nécessite d'être superutilisateur pour pouvoir
l'utiliser.
</para>

<para>
The tables added to a publication that publishes <command>UPDATE</command>
and/or <command>DELETE</command> operations must have
<literal>REPLICA IDENTITY</literal> defined. Otherwise those operations will be
disallowed on those tables.
Les tables ajoutées à une publication qui publie les opérations
<command>UPDATE</command> et/ou <command>DELETE</command> doivent avoir
<literal>REPLICA IDENTITY</literal> défini. Autrement ces opérations seront
interdites sur ces tables.
</para>

<para>
For an <command>INSERT ... ON CONFLICT</command> command, the publication will
publish the operation that actually results from the command. So depending
of the outcome, it may be published as either <command>INSERT</command> or
<command>UPDATE</command>, or it may not be published at all.
Pour une commande <command>INSERT ... ON CONFLICT</command>, la publication
publiera l'opération qui résulte réellement de la commande. Ainsi, en
fonction du résultat, cela pourrait être publiée comme un
<command>INSERT</command> ou un <command>UPDATE</command>, ou cela pourrait
ne pas être publié du tout.
</para>

<para>
<command>TRUNCATE</command> and <acronym>DDL</acronym> operations
are not published.
Les opérations <command>TRUNCATE</command> et <acronym>DDL</acronym>
ne sont pas publiées.
</para>
</refsect1>

<refsect1>
<title>Examples</title>
<title>Exemples</title>

<para>
Create a publication that publishes all changes in two tables:
Créer une publication qui publie tous les changement sur deux tables :
<programlisting>
CREATE PUBLICATION mypublication FOR TABLE users, departments;
</programlisting>
</para>

<para>
Create a publication that publishes all changes in all tables:
Créer une publication qui publie tous les changement sur toutes les tables :
<programlisting>
CREATE PUBLICATION alltables FOR ALL TABLES;
</programlisting>
</para>

<para>
Create a publication that only publishes <command>INSERT</command>
operations in one table:
Créer une publication qui ne publie que les opérations
d'<command>INSERT</command> sur une table :
<programlisting>
CREATE PUBLICATION insert_only FOR TABLE mydata
WITH (publish = 'insert');
Expand All @@ -197,16 +205,16 @@ CREATE PUBLICATION insert_only FOR TABLE mydata
</refsect1>

<refsect1>
<title>Compatibility</title>
<title>Compatibilité</title>

<para>
<command>CREATE PUBLICATION</command> is a <productname>PostgreSQL</productname>
extension.
<command>CREATE PUBLICATION</command> est une extension
<productname>PostgreSQL</productname> au langage SQL.
</para>
</refsect1>

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

<simplelist type="inline">
<member><xref linkend="sql-alterpublication"/></member>
Expand Down

0 comments on commit 98924e8

Please sign in to comment.