> Hello All,
> Can anybody suggest me the work around method to avoid manually writting
> ADD
> TABLE and ADD SEQUENCE
> Because I have around 500 table and 500 sequences.
Pretty much any automation method can work for this.
Assuming you had all the tables in a single schema, and could assemble the
table names into a single string, here's one way of generating all of the
"set ad table" requests:
TABLES="acc_trans ap ar assembly audittrail business chart
custom_field_catalog custom_table_catalog customer customertax
defaults department dpt_trans employee exchangerate gifi gl inventory
invoice jcitems language makemodel oe orderitems parts partscustomer
partsgroup partstax partsvendor pricegroup project recurring
recurringemail recurringprint session shipto sic status tax
transactions translation vendor vendortax warehouse yearend"
tnum=1
for table in `echo $TABLES`; do
echo "set add table (id=${tnum}, set id=1, origin=1, fully qualified
name='public.${table}', comment='${CLUSTER} table ${table}');" >>
$SETUPSET
tnum=`expr ${tnum} + 1`
done
The above code is borrowed from the script "tools/configure-replication.sh"
You might be able to get the names of tables via some query against
information_schema.tables; that view could be of help in generating the
list of table names.
_______________________________________________
Slony1-general mailing list
[email protected]
http://gborg.postgresql.org/mailman/listinfo/slony1-general