drop database if exists dump_type_db;
create database dump_type_db;
\c dump_type_db
drop schema if exists dumptest cascade;
create schema dumptest;
create type dams_arrytype is table of varchar2(4000);
comment on type dams_arrytype is 'this is a table of type';
create type s_type_1 is (
id integer,
name varchar,
addr text
);
create type dams_arrytype1 is table of s_type_1;
create procedure comment_test_procedure(int,int) as begin select $1 + $2;end;
/
comment on function comment_test_procedure(int,int) is 'test_comment_on';
\! @abs_bindir@/gs_dump dump_type_db -p @portstring@ -f @abs_bindir@/dump_type.tar -F t >/dev/null 2>&1; echo $?
drop database if exists restore_type_db;
create database restore_type_db;
\! @abs_bindir@/gs_restore -d restore_type_db -p @portstring@ @abs_bindir@/dump_type.tar >/dev/null 2>&1; echo $?
\c restore_type_db
select proname, obj_description(oid, 'pg_proc') AS comment from pg_proc where proname = 'comment_test_procedure';
drop database if exists dump_mysql;
create database dump_mysql dbcompatibility 'B';
\c dump_mysql
create table mysql_on_update_timestamp_tab_08(
c1 timestamptz on update current_timestamp,
c2 timestamptz on update current_timestamp(1),
c3 timestamptz on update current_timestamp(5),
c4 int);
insert into mysql_on_update_timestamp_tab_08 values(NULL,NULL,NULL,1);
insert into mysql_on_update_timestamp_tab_08 values(now(),now(),now(),2);
insert into mysql_on_update_timestamp_tab_08 values(NULL,now(),NULL,3);
\! @abs_bindir@/gs_dump dump_mysql -p @portstring@ -f @abs_bindir@/dump_timestamp.tar -F t >/dev/null 2>&1; echo $?
drop database if exists restore_timestamp;
create database restore_timestamp dbcompatibility 'B';
\! @abs_bindir@/gs_restore -d restore_timestamp -p @portstring@ @abs_bindir@/dump_timestamp.tar >/dev/null 2>&1; echo $?
\c restore_timestamp
\d mysql_on_update_timestamp_tab_08
\c regression
drop database if exists restore_type_db;
drop database if exists dump_type_db;
drop database if exists dump_mysql;
drop database if exists restore_timestamp;