Your query of information_schema.tables will work fine to determine if
slony schema is installed. You can take the results of this query
(particularly table_schema) then call:
SELECT _table_schema.getlocalnodeid('_table_schema')
With this result, you can determine if the node is a receiver or
provider for any sets via a query of sl_subscribe.
Regards,
JP
Knight, Doug wrote:
All,
I have a need to create a script that automatically determines if
slony is installed and replicating on a specific database. The idea is
that another script that handles time partitioned table drops/creates
could call this script to determine if it needs to do any special
slony processing instead of its direct drop/create statements (i.e.
pass the SQL via slonik EXECUTE SCRIPT). I figure I’ll be looking in
the information_schema schema for the current database. Is there any
particular place I should look (maybe the existence of an sl_status
table in information_schema.tables)? Any best practices would be great.
Thanks,
Doug Knight
------------------------------------------------------------------------
_______________________________________________
Slony1-general mailing list
[email protected]
http://lists.slony.info/mailman/listinfo/slony1-general
--
JP Fletcher
Database Administrator
Afilias Canada
voice: 416.646.3304 ext. 4123
fax: 416.646.3305
mobile: 416.561.4763
[EMAIL PROTECTED]
_______________________________________________
Slony1-general mailing list
[email protected]
http://lists.slony.info/mailman/listinfo/slony1-general