Top

Name

repl_text — adds a SQL statement to the log of the replication

Synopsis

repl_text ( in publication varchar ,
  in sqltext varchar ,
  in a-1 any ,
  ... );
 

Description

This SQL function adds the SQL statement to the log of the publication. The statement will typically be a procedure call but can be any SQL statement. There can be a parameters, which are bound to ?'s in the statement's text from left to right. There is no restriction on the number of parameters.

Parameters

publication

The name of the target publication

sqltext

sql expression with unnamed parameters if needed.

a-1 ... a-n

parameter value, in order as in sqltext parameter.

[Note] Note:

The parameters are input only since the actual call will take place on a remote server at an unknown future time.

Example

Example 24.336. Logging a SQL statement into a publication

Suppose on subscriber side we have a table 'foo' with two columns (integer and varchar). This statement will send a replication message to the subscribers to insert a row into the table 'foo'.

SQL> repl_text ('demo-publication', 'insert into foo values (?, ?)', 1, 'this is a test');