-SQLS = v2.1.5_londiste.sql v2.1.5_pgq_core.sql v2.1.5_pgq_ext.sql
+#SQLS = v2.1.5_londiste.sql v2.1.5_pgq_core.sql v2.1.5_pgq_ext.sql
+SQLS = v2.1.6_londiste.sql v2.1.6_pgq_ext.sql
SRCS = $(addprefix src/, $(SQLS))
DSTS = $(addprefix final/, $(SQLS))
primary key (table_name, trigger_name)
);
-drop function londiste.denytrigger();
+-- drop function londiste.denytrigger();
select n1.nspname || '.' || t1.relname as from_table, n2.nspname || '.' || t2.relname as to_table,
conname::text as fkey_name,
'alter table only ' || quote_ident(n1.nspname) || '.' || quote_ident(t1.relname)
- || ' add constraint ' || quote_ident(fkey.fkey_name) || ' ' || pg_get_constraintdef(c.oid)
+ || ' add constraint ' || quote_ident(conname::text) || ' ' || pg_get_constraintdef(c.oid)
as fkey_def
from pg_constraint c, pg_namespace n1, pg_class t1, pg_namespace n2, pg_class t2
where c.contype = 'f' and (c.conrelid = tbl_oid or c.confrelid = tbl_oid)
begin;
-alter table pgq.subscription constraint subscription_ukey unique (sub_queue, sub_consumer);
+alter table pgq.subscription add constraint subscription_ukey unique (sub_queue, sub_consumer);
create index rq_retry_owner_idx on pgq.retry_queue (ev_owner, ev_id);
-- List of table names.
-- ----------------------------------------------------------------------
declare
- tbl text;
- scm text;
+ row record;
begin
return next 'pgq.subscription';
return next 'pgq.consumer';
return next 'pgq.retry_queue';
-- include also txid, pgq_ext and londiste tables if they exist
- for scm, tbl in
- select n.nspname, t.relname from pg_class t, pg_namespace n
+ for row in
+ select n.nspname as scm, t.relname as tbl
+ from pg_class t, pg_namespace n
where n.oid = t.relnamespace
and n.nspname = 'txid' and t.relname = 'epoch'
union all
- select n.nspname, t.relname from pg_class t, pg_namespace n
+ select n.nspname as scm, t.relname as tbl
+ from pg_class t, pg_namespace n
where n.oid = t.relnamespace
and n.nspname = 'londiste' and t.relname = 'completed'
union all
- select n.nspname, t.relname from pg_class t, pg_namespace n
+ select n.nspname as scm, t.relname as tbl
+ from pg_class t, pg_namespace n
where n.oid = t.relnamespace
and n.nspname = 'pgq_ext'
and t.relname in ('completed_tick', 'completed_batch', 'completed_event', 'partial_batch')
loop
- return next scm || '.' || tbl;
+ return next row.scm || '.' || row.tbl;
end loop;
return;