From 9196c9d2f5ec5d4d3632f9e01df03f41993f3e0f Mon Sep 17 00:00:00 2001 From: Marko Kreen Date: Mon, 15 Sep 2008 11:07:38 +0000 Subject: [PATCH] use drop lang to allow plpgsql exist in template1 --- expected/plproxy_encoding.out | 4 ++++ sql/plproxy_encoding.sql | 4 ++++ sql/plproxy_init.sql | 5 +++++ 3 files changed, 13 insertions(+) diff --git a/expected/plproxy_encoding.out b/expected/plproxy_encoding.out index 4255a62..c13a950 100644 --- a/expected/plproxy_encoding.out +++ b/expected/plproxy_encoding.out @@ -17,6 +17,7 @@ create database test_enc_part with encoding 'utf-8'; -- initialize proxy db \c test_enc_proxy set client_encoding = 'utf-8'; +drop language if exists plpgsql; create language plpgsql; \i plproxy.sql -- handler function @@ -46,6 +47,7 @@ create function test_encoding3(text) returns setof intl_data as $$ $$ language plproxy; -- initialize part db \c test_enc_part +drop language if exists plpgsql; create language plpgsql; set client_encoding = 'utf8'; create table intl_data (id int4, "コラム" text); @@ -122,6 +124,7 @@ create database test_enc_proxy with encoding 'utf-8'; create database test_enc_part with encoding 'euc_jp'; -- initialize proxy db \c test_enc_proxy +drop language if exists plpgsql; create language plpgsql; \i plproxy.sql -- handler function @@ -152,6 +155,7 @@ create function test_encoding3(text) returns setof intl_data as $$ $$ language plproxy; -- initialize part db \c test_enc_part +drop language if exists plpgsql; create language plpgsql; set client_encoding = 'utf8'; create table intl_data (id int4, "コラム" text); diff --git a/sql/plproxy_encoding.sql b/sql/plproxy_encoding.sql index 8453111..0de4365 100644 --- a/sql/plproxy_encoding.sql +++ b/sql/plproxy_encoding.sql @@ -23,6 +23,7 @@ create database test_enc_part with encoding 'utf-8'; -- initialize proxy db \c test_enc_proxy set client_encoding = 'utf-8'; +drop language if exists plpgsql; create language plpgsql; \i plproxy.sql create schema plproxy; @@ -48,6 +49,7 @@ create function test_encoding3(text) returns setof intl_data as $$ $$ language plproxy; -- initialize part db \c test_enc_part +drop language if exists plpgsql; create language plpgsql; set client_encoding = 'utf8'; create table intl_data (id int4, "コラム" text); @@ -88,6 +90,7 @@ create database test_enc_part with encoding 'euc_jp'; -- initialize proxy db \c test_enc_proxy +drop language if exists plpgsql; create language plpgsql; \i plproxy.sql set client_encoding = 'utf8'; @@ -115,6 +118,7 @@ $$ language plproxy; -- initialize part db \c test_enc_part +drop language if exists plpgsql; create language plpgsql; set client_encoding = 'utf8'; create table intl_data (id int4, "コラム" text); diff --git a/sql/plproxy_init.sql b/sql/plproxy_init.sql index b1fa580..3b9fb53 100644 --- a/sql/plproxy_init.sql +++ b/sql/plproxy_init.sql @@ -52,13 +52,18 @@ drop database if exists test_enc_proxy; drop database if exists test_enc_part; \c test_part +drop language if exists plpgsql; create language plpgsql; \c test_part0 +drop language if exists plpgsql; create language plpgsql; \c test_part1 +drop language if exists plpgsql; create language plpgsql; \c test_part2 +drop language if exists plpgsql; create language plpgsql; \c test_part3 +drop language if exists plpgsql; create language plpgsql; -- 2.39.5