bugzilla-daemon at main.slony.info bugzilla-daemon at main.slony.info
Mon May 30 12:27:34 PDT 2011
http://www.slony.info/bugzilla/show_bug.cgi?id=217

--- Comment #7 from Steve Singer <ssinger at ca.afilias.info> 2011-05-30 12:27:35 PDT ---
(In reply to comment #3)
> The following query will detect if the primary key/unique index has changed
> since the log trigger was created.
> 
> select  tab_relname from _test.sl_table, pg_trigger where tab_reloid=tgrelid
> and
> _test.determineAttKindUnique(tab_nspname||'.'||tab_relname,tab_idxname)!=(string_to_array(tgargs::text,E'\\000'::text))[3];
> 
> (where _test is the slony schema name, replace with your slony schema name)

A better version of the query is

select  tab_relname from _test.sl_table, pg_trigger where tab_reloid=tgrelid
and
_test.determineAttKindUnique(tab_nspname||'.'||tab_relname,tab_idxname)!=(string_to_array(tgargs::text,E'\\000'::text))[3]
and tgname='_test_logtrigger';

(Note the and tgname='....' to only include the log triggers.)

-- 
Configure bugmail: http://www.slony.info/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
You are the assignee for the bug.


More information about the Slony1-bugs mailing list