Name

REPL_PUB_ADD — add item to a publication

Synopsis

REPL_PUB_ADD ( in publication varchar ,
in item varchar ,
in type integer ,
in mode integer ,
in procedure_replication_options integer );

Description

This function is used to add items to a pre-existing publication and to set replication options for the published items. Operations concerning the added item will henceforth be logged into the publication's log. Performing this operation will copy the item and optionally its definition to existing subscribers.

Parameters

publication

publication account name.

item

dependent on type should be:

Valid WebDAV collection full path in local repository.
Fully qualified table name.
Fully qualified Virtuoso/PL procedure name.

type

type of item, can accept following types:

1 - item is a WebDAV collection.
2 - item is a database table.
3 - item is a Virtuoso/PL procedure.

mode

mode of remote copy:

0 - if publication is removed leave remote copy (on subscribers).
1 - if publication is removed drop remote copy (on subscribers).

procedure_replication_options

valid only in case of Virtuoso/PL procedure:

1 - published procedure calls.
2 - published procedure definition.
3 - published both calls and definition.

Example

Example24.324.Adding a table to the publication

This is to add a table Demo.demo.Orders (available in the demo DataBase) to the an existing publication named table_publication. The default flag for removal when publication is dropped is set to off. The parameter mode is NULL as it has effect only for procedures.

SQL> DB.DBA.REPL_PUB_ADD ('table_publication', 'Demo.demo.Orders', 2, 0, NULL);