sql/londiste: 9.0 compat
authorMarko Kreen <markokr@gmail.com>
Tue, 11 May 2010 12:25:31 +0000 (15:25 +0300)
committerMarko Kreen <markokr@gmail.com>
Tue, 11 May 2010 12:25:31 +0000 (15:25 +0300)
- londiste.get_table_list(): qualify argument refs with function name
- regtest: load plpgsql ourself
- regtest: avoid contrib_regression on older postgres

sql/londiste/Makefile
sql/londiste/functions/londiste.get_table_list.sql
sql/londiste/sql/londiste_install.sql

index e07d5a0dfde5d159c9cafb0024b36cb07ee1ed7c..5295e10d4734b7c981215821283599396be25f95 100644 (file)
@@ -8,7 +8,7 @@ SRCS = $(SQLS) $(FUNCS)
 REGRESS = londiste_install londiste_provider londiste_subscriber \
          londiste_fkeys londiste_execute londiste_seqs londiste_merge
 # londiste_denytrigger
-REGRESS_OPTS = --load-language=plpgsql
+REGRESS_OPTS = --dbname=regression
 
 include ../../config.mak
 
index 813ce566f7597dd130e7f7f8e7789de4b11e155b..38ca4668aa48be3dc54ee7c22bedbc1ba818ceda 100644 (file)
@@ -72,7 +72,7 @@ begin
                 from londiste.table_info t, pgq_node.node_info n
                 where n.combined_queue = q_target
                     and t.queue_name = n.queue_name
-                    and t.table_name = table_name
+                    and t.table_name = get_table_list.table_name
                     and (t.merge_state is not null
                          and t.merge_state <> 'in-copy');
             if i_queue_name = q_part1 then
@@ -89,7 +89,7 @@ begin
                     -- has lead already dropped ddl?
                     perform 1 from londiste.table_info t
                         where t.queue_name = q_part1
-                            and t.table_name = table_name
+                            and t.table_name = get_table_list.table_name
                             and t.dropped_ddl is not null;
                     if found then
                         copy_role := 'wait-replay';
index c2fcecfe8d8562d17c825e6a33aaecb7b819a152..7dfb221bffc306a1feb536c289d1868c64e1ed1a 100644 (file)
@@ -1,6 +1,10 @@
 \set ECHO off
+
 set log_error_verbosity = 'terse';
 
+drop language if exists plpgsql;
+create language plpgsql;
+
 \i ../txid/txid.sql
 \i ../pgq/pgq.sql
 \i ../pgq_node/pgq_node.sql