cbbrowne at ca.afilias.info cbbrowne
Wed Sep 13 05:12:27 PDT 2006
> Is there a way to select all the tables for synchronzation insted of
> adding them manually (with "set add tables...")?
> Because in my database structure more than 100 tables...

Sure, there are a bunch of ways of lightly automating that.

- You could write a query against information_schema.tables that generates
"set add tables" commands.

- You could pull a list of tables into a shell variable, TABLES, and then
create a loop:

   for table in `echo $TABLES`; do
      print "set add table (..., fully qualified name='${table}');"
   done

- I often use editor macros for this; I get a list of tables in a file,
start recording a macro, change the first line into a SET ADD TABLE
command, and then repeat the command against the subsequent lines.

Whatever is your favorite way of "scripting" things will be fine for this.




More information about the Slony1-general mailing list