提交 0db64e68 编写于 作者: S Shoaib Lari 提交者: Ashwin Agrawal

Remove time zone columns from storage/walrepl/crash tests.

The `with time zone` functionality is tested in several other storage test
suites, such as those in access_methods, aoco_alter, aoco_compression,
pg_two_phase etc. Therefore, we are removing the `with time zone` columns form
the storage/walrepl/crash tests.
上级 99d022ea
......@@ -47,10 +47,10 @@ Drop table if exists sto_ao2;
psql:/path/sql_file:1: NOTICE: table "sto_ao2" does not exist, skipping
DROP TABLE
--end_ignore
Create table sto_ao2 (id SERIAL,a1 int,a2 char(5),a3 numeric,a4 boolean DEFAULT false ,a5 char DEFAULT 'd',a6 text,a7 timestamp,a8 character varying(705),a9 bigint,a10 date,a11 varchar(600),a12 text,a13 decimal,a14 real,a15 bigint,a16 int4 ,a17 bytea,a18 timestamp with time zone,a19 timetz,a20 path,a21 box,a22 macaddr,a23 interval,a24 character varying(800),a25 lseg,a26 point,a27 double precision,a28 circle,a29 int4,a30 numeric(8),a31 polygon,a32 date,a33 real,a34 money,a35 cidr,a36 inet,a37 time,a38 text,a39 bit,a40 bit varying(5),a41 smallint,a42 int ) with(appendonly=true) distributed randomly;
Create table sto_ao2 (id SERIAL,a1 int,a2 char(5),a3 numeric,a4 boolean DEFAULT false ,a5 char DEFAULT 'd',a6 text,a7 timestamp,a8 character varying(705),a9 bigint,a10 date,a11 varchar(600),a12 text,a13 decimal,a14 real,a15 bigint,a16 int4 ,a17 bytea,a20 path,a21 box,a22 macaddr,a23 interval,a24 character varying(800),a25 lseg,a26 point,a27 double precision,a28 circle,a29 int4,a30 numeric(8),a31 polygon,a32 date,a33 real,a34 money,a35 cidr,a36 inet,a37 time,a38 text,a39 bit,a40 bit varying(5),a41 smallint,a42 int ) with(appendonly=true) distributed randomly;
psql:/path/sql_file:1: NOTICE: CREATE TABLE will create implicit sequence "sto_ao2_id_seq" for serial column "sto_ao2.id"
CREATE TABLE
INSERT INTO sto_ao2 (a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,a16,a17,a18,a19,a20,a21,a22,a23,a24,a25,a26,a27,a28,a29,a30,a31,a32,a33,a34,a35,a36,a37,a38,a39,a40,a41,a42) values(generate_series(1,4),'M',2011,'t','a','This is news of today: Deadlock between Republicans and Democrats over how best to reduce the U.S. deficit, and over what period, has blocked an agreement to allow the raising of the $14.3 trillion debt ceiling','2001-12-24 02:26:11','U.S. House of Representatives Speaker John Boehner, the top Republican in Congress who has put forward a deficit reduction plan to be voted on later on Thursday said he had no control over whether his bill would avert a credit downgrade.',generate_series(5,7),'2011-10-11','The Republican-controlled House is tentatively scheduled to vote on Boehner proposal this afternoon at around 6 p.m. EDT (2200 GMT). The main Republican vote counter in the House, Kevin McCarthy, would not say if there were enough votes to pass the bill.','WASHINGTON:House Speaker John Boehner says his plan mixing spending cuts in exchange for raising the nations $14.3 trillion debt limit is not perfect but is as large a step that a divided government can take that is doable and signable by President Barack Obama.The Ohio Republican says the measure is an honest and sincere attempt at compromise and was negotiated with Democrats last weekend and that passing it would end the ongoing debt crisis. The plan blends $900 billion-plus in spending cuts with a companion increase in the nations borrowing cap.','1234.56',323453,generate_series(4,6),7845,'0011','2005-07-16 01:51:15+1359','2001-12-13 01:51:15','((1,2),(0,3),(2,1))','((2,3)(4,5))','08:00:2b:01:02:03','1-2','Republicans had been working throughout the day Thursday to lock down support for their plan to raise the nations debt ceiling, even as Senate Democrats vowed to swiftly kill it if passed.','((2,3)(4,5))','(6,7)',11.222,'((4,5),7)',32,3214,'(1,0,2,3)','2010-02-21',43564,'$1,000.00','192.168.1','126.1.3.4','12:30:45','Johnson & Johnsons McNeil Consumer Healthcare announced the voluntary dosage reduction today. Labels will carry new dosing instructions this fall.The company says it will cut the maximum dosage of Regular Strength Tylenol and other acetaminophen-containing products in 2012.Acetaminophen is safe when used as directed, says Edwin Kuffner, MD, McNeil vice president of over-the-counter medical affairs. But, when too much is taken, it can cause liver damage.The action is intended to cut the risk of such accidental overdoses, the company says in a news release.','1','0',12,23);
INSERT INTO sto_ao2 (a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,a16,a17,a20,a21,a22,a23,a24,a25,a26,a27,a28,a29,a30,a31,a32,a33,a34,a35,a36,a37,a38,a39,a40,a41,a42) values(generate_series(1,4),'M',2011,'t','a','This is news of today: Deadlock between Republicans and Democrats over how best to reduce the U.S. deficit, and over what period, has blocked an agreement to allow the raising of the $14.3 trillion debt ceiling','2001-12-24 02:26:11','U.S. House of Representatives Speaker John Boehner, the top Republican in Congress who has put forward a deficit reduction plan to be voted on later on Thursday said he had no control over whether his bill would avert a credit downgrade.',generate_series(5,7),'2011-10-11','The Republican-controlled House is tentatively scheduled to vote on Boehner proposal this afternoon at around 6 p.m. EDT (2200 GMT). The main Republican vote counter in the House, Kevin McCarthy, would not say if there were enough votes to pass the bill.','WASHINGTON:House Speaker John Boehner says his plan mixing spending cuts in exchange for raising the nations $14.3 trillion debt limit is not perfect but is as large a step that a divided government can take that is doable and signable by President Barack Obama.The Ohio Republican says the measure is an honest and sincere attempt at compromise and was negotiated with Democrats last weekend and that passing it would end the ongoing debt crisis. The plan blends $900 billion-plus in spending cuts with a companion increase in the nations borrowing cap.','1234.56',323453,generate_series(4,6),7845,'0011','((1,2),(0,3),(2,1))','((2,3)(4,5))','08:00:2b:01:02:03','1-2','Republicans had been working throughout the day Thursday to lock down support for their plan to raise the nations debt ceiling, even as Senate Democrats vowed to swiftly kill it if passed.','((2,3)(4,5))','(6,7)',11.222,'((4,5),7)',32,3214,'(1,0,2,3)','2010-02-21',43564,'$1,000.00','192.168.1','126.1.3.4','12:30:45','Johnson & Johnsons McNeil Consumer Healthcare announced the voluntary dosage reduction today. Labels will carry new dosing instructions this fall.The company says it will cut the maximum dosage of Regular Strength Tylenol and other acetaminophen-containing products in 2012.Acetaminophen is safe when used as directed, says Edwin Kuffner, MD, McNeil vice president of over-the-counter medical affairs. But, when too much is taken, it can cause liver damage.The action is intended to cut the risk of such accidental overdoses, the company says in a news release.','1','0',12,23);
INSERT 0 12
select count(*) from sto_ao2;
count
......
......@@ -45,10 +45,10 @@ select * from sto_co1 order by col_numeric;
Drop table if exists sto_co2;
DROP TABLE
--end_ignore
Create table sto_co2 (id SERIAL,a1 int,a2 char(5),a3 numeric,a4 boolean DEFAULT false ,a5 char DEFAULT 'd',a6 text,a7 timestamp,a8 character varying(705),a9 bigint,a10 date,a11 varchar(600),a12 text,a13 decimal,a14 real,a15 bigint,a16 int4 ,a17 bytea,a18 timestamp with time zone,a19 timetz,a20 path,a21 box,a22 macaddr,a23 interval,a24 character varying(800),a25 lseg,a26 point,a27 double precision,a28 circle,a29 int4,a30 numeric(8),a31 polygon,a32 date,a33 real,a34 money,a35 cidr,a36 inet,a37 time,a38 text,a39 bit,a40 bit varying(5),a41 smallint,a42 int ) with(appendonly=true,orientation=column) distributed randomly;
Create table sto_co2 (id SERIAL,a1 int,a2 char(5),a3 numeric,a4 boolean DEFAULT false ,a5 char DEFAULT 'd',a6 text,a7 timestamp,a8 character varying(705),a9 bigint,a10 date,a11 varchar(600),a12 text,a13 decimal,a14 real,a15 bigint,a16 int4 ,a17 bytea,a20 path,a21 box,a22 macaddr,a23 interval,a24 character varying(800),a25 lseg,a26 point,a27 double precision,a28 circle,a29 int4,a30 numeric(8),a31 polygon,a32 date,a33 real,a34 money,a35 cidr,a36 inet,a37 time,a38 text,a39 bit,a40 bit varying(5),a41 smallint,a42 int ) with(appendonly=true,orientation=column) distributed randomly;
psql:/path/sql_file:1: NOTICE: CREATE TABLE will create implicit sequence "sto_co2_id_seq" for serial column "sto_co2.id"
CREATE TABLE
INSERT INTO sto_co2 (a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,a16,a17,a18,a19,a20,a21,a22,a23,a24,a25,a26,a27,a28,a29,a30,a31,a32,a33,a34,a35,a36,a37,a38,a39,a40,a41,a42) values(generate_series(1,4),'M',2011,'t','a','This is news of today: Deadlock between Republicans and Democrats over how best to reduce the U.S. deficit, and over what period, has blocked an agreement to allow the raising of the $14.3 trillion debt ceiling','2001-12-24 02:26:11','U.S. House of Representatives Speaker John Boehner, the top Republican in Congress who has put forward a deficit reduction plan to be voted on later on Thursday said he had no control over whether his bill would avert a credit downgrade.',generate_series(5,7),'2011-10-11','The Republican-controlled House is tentatively scheduled to vote on Boehner proposal this afternoon at around 6 p.m. EDT (2200 GMT). The main Republican vote counter in the House, Kevin McCarthy, would not say if there were enough votes to pass the bill.','WASHINGTON:House Speaker John Boehner says his plan mixing spending cuts in exchange for raising the nations $14.3 trillion debt limit is not perfect but is as large a step that a divided government can take that is doable and signable by President Barack Obama.The Ohio Republican says the measure is an honest and sincere attempt at compromise and was negotiated with Democrats last weekend and that passing it would end the ongoing debt crisis. The plan blends $900 billion-plus in spending cuts with a companion increase in the nations borrowing cap.','1234.56',323453,generate_series(4,6),7845,'0011','2005-07-16 01:51:15+1359','2001-12-13 01:51:15','((1,2),(0,3),(2,1))','((2,3)(4,5))','08:00:2b:01:02:03','1-2','Republicans had been working throughout the day Thursday to lock down support for their plan to raise the nations debt ceiling, even as Senate Democrats vowed to swiftly kill it if passed.','((2,3)(4,5))','(6,7)',11.222,'((4,5),7)',32,3214,'(1,0,2,3)','2010-02-21',43564,'$1,000.00','192.168.1','126.1.3.4','12:30:45','Johnson & Johnsons McNeil Consumer Healthcare announced the voluntary dosage reduction today. Labels will carry new dosing instructions this fall.The company says it will cut the maximum dosage of Regular Strength Tylenol and other acetaminophen-containing products in 2012.Acetaminophen is safe when used as directed, says Edwin Kuffner, MD, McNeil vice president of over-the-counter medical affairs. But, when too much is taken, it can cause liver damage.The action is intended to cut the risk of such accidental overdoses, the company says in a news release.','1','0',12,23);
INSERT INTO sto_co2 (a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,a16,a17,a20,a21,a22,a23,a24,a25,a26,a27,a28,a29,a30,a31,a32,a33,a34,a35,a36,a37,a38,a39,a40,a41,a42) values(generate_series(1,4),'M',2011,'t','a','This is news of today: Deadlock between Republicans and Democrats over how best to reduce the U.S. deficit, and over what period, has blocked an agreement to allow the raising of the $14.3 trillion debt ceiling','2001-12-24 02:26:11','U.S. House of Representatives Speaker John Boehner, the top Republican in Congress who has put forward a deficit reduction plan to be voted on later on Thursday said he had no control over whether his bill would avert a credit downgrade.',generate_series(5,7),'2011-10-11','The Republican-controlled House is tentatively scheduled to vote on Boehner proposal this afternoon at around 6 p.m. EDT (2200 GMT). The main Republican vote counter in the House, Kevin McCarthy, would not say if there were enough votes to pass the bill.','WASHINGTON:House Speaker John Boehner says his plan mixing spending cuts in exchange for raising the nations $14.3 trillion debt limit is not perfect but is as large a step that a divided government can take that is doable and signable by President Barack Obama.The Ohio Republican says the measure is an honest and sincere attempt at compromise and was negotiated with Democrats last weekend and that passing it would end the ongoing debt crisis. The plan blends $900 billion-plus in spending cuts with a companion increase in the nations borrowing cap.','1234.56',323453,generate_series(4,6),7845,'0011','((1,2),(0,3),(2,1))','((2,3)(4,5))','08:00:2b:01:02:03','1-2','Republicans had been working throughout the day Thursday to lock down support for their plan to raise the nations debt ceiling, even as Senate Democrats vowed to swiftly kill it if passed.','((2,3)(4,5))','(6,7)',11.222,'((4,5),7)',32,3214,'(1,0,2,3)','2010-02-21',43564,'$1,000.00','192.168.1','126.1.3.4','12:30:45','Johnson & Johnsons McNeil Consumer Healthcare announced the voluntary dosage reduction today. Labels will carry new dosing instructions this fall.The company says it will cut the maximum dosage of Regular Strength Tylenol and other acetaminophen-containing products in 2012.Acetaminophen is safe when used as directed, says Edwin Kuffner, MD, McNeil vice president of over-the-counter medical affairs. But, when too much is taken, it can cause liver damage.The action is intended to cut the risk of such accidental overdoses, the company says in a news release.','1','0',12,23);
INSERT 0 12
select count(*) from sto_co2;
count
......
......@@ -54,10 +54,10 @@ select * from sto_heap1 order by col_numeric;
Drop table if exists sto_heap2;
DROP TABLE
--end_ignore
Create table sto_heap2 (id SERIAL,a1 int,a2 char(5),a3 numeric,a4 boolean DEFAULT false ,a5 char DEFAULT 'd',a6 text,a7 timestamp,a8 character varying(705),a9 bigint,a10 date,a11 varchar(600),a12 text,a13 decimal,a14 real,a15 bigint,a16 int4 ,a17 bytea,a18 timestamp with time zone,a19 timetz,a20 path,a21 box,a22 macaddr,a23 interval,a24 character varying(800),a25 lseg,a26 point,a27 double precision,a28 circle,a29 int4,a30 numeric(8),a31 polygon,a32 date,a33 real,a34 money,a35 cidr,a36 inet,a37 time,a38 text,a39 bit,a40 bit varying(5),a41 smallint,a42 int ) distributed randomly;
Create table sto_heap2 (id SERIAL,a1 int,a2 char(5),a3 numeric,a4 boolean DEFAULT false ,a5 char DEFAULT 'd',a6 text,a7 timestamp,a8 character varying(705),a9 bigint,a10 date,a11 varchar(600),a12 text,a13 decimal,a14 real,a15 bigint,a16 int4 ,a17 bytea,a20 path,a21 box,a22 macaddr,a23 interval,a24 character varying(800),a25 lseg,a26 point,a27 double precision,a28 circle,a29 int4,a30 numeric(8),a31 polygon,a32 date,a33 real,a34 money,a35 cidr,a36 inet,a37 time,a38 text,a39 bit,a40 bit varying(5),a41 smallint,a42 int ) distributed randomly;
psql:/path/sql_file:1: NOTICE: CREATE TABLE will create implicit sequence "sto_heap2_id_seq" for serial column "sto_heap2.id"
CREATE TABLE
INSERT INTO sto_heap2 (a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,a16,a17,a18,a19,a20,a21,a22,a23,a24,a25,a26,a27,a28,a29,a30,a31,a32,a33,a34,a35,a36,a37,a38,a39,a40,a41,a42) values(generate_series(1,4),'M',2011,'t','a','This is news of today: Deadlock between Republicans and Democrats over how best to reduce the U.S. deficit, and over what period, has blocked an agreement to allow the raising of the $14.3 trillion debt ceiling','2001-12-24 02:26:11','U.S. House of Representatives Speaker John Boehner, the top Republican in Congress who has put forward a deficit reduction plan to be voted on later on Thursday said he had no control over whether his bill would avert a credit downgrade.',generate_series(5,7),'2011-10-11','The Republican-controlled House is tentatively scheduled to vote on Boehner proposal this afternoon at around 6 p.m. EDT (2200 GMT). The main Republican vote counter in the House, Kevin McCarthy, would not say if there were enough votes to pass the bill.','WASHINGTON:House Speaker John Boehner says his plan mixing spending cuts in exchange for raising the nations $14.3 trillion debt limit is not perfect but is as large a step that a divided government can take that is doable and signable by President Barack Obama.The Ohio Republican says the measure is an honest and sincere attempt at compromise and was negotiated with Democrats last weekend and that passing it would end the ongoing debt crisis. The plan blends $900 billion-plus in spending cuts with a companion increase in the nations borrowing cap.','1234.56',323453,generate_series(4,6),7845,'0011','2005-07-16 01:51:15+1359','2001-12-13 01:51:15','((1,2),(0,3),(2,1))','((2,3)(4,5))','08:00:2b:01:02:03','1-2','Republicans had been working throughout the day Thursday to lock down support for their plan to raise the nations debt ceiling, even as Senate Democrats vowed to swiftly kill it if passed.','((2,3)(4,5))','(6,7)',11.222,'((4,5),7)',32,3214,'(1,0,2,3)','2010-02-21',43564,'$1,000.00','192.168.1','126.1.3.4','12:30:45','Johnson & Johnsons McNeil Consumer Healthcare announced the voluntary dosage reduction today. Labels will carry new dosing instructions this fall.The company says it will cut the maximum dosage of Regular Strength Tylenol and other acetaminophen-containing products in 2012.Acetaminophen is safe when used as directed, says Edwin Kuffner, MD, McNeil vice president of over-the-counter medical affairs. But, when too much is taken, it can cause liver damage.The action is intended to cut the risk of such accidental overdoses, the company says in a news release.','1','0',12,23);
INSERT INTO sto_heap2 (a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,a16,a17,a20,a21,a22,a23,a24,a25,a26,a27,a28,a29,a30,a31,a32,a33,a34,a35,a36,a37,a38,a39,a40,a41,a42) values(generate_series(1,4),'M',2011,'t','a','This is news of today: Deadlock between Republicans and Democrats over how best to reduce the U.S. deficit, and over what period, has blocked an agreement to allow the raising of the $14.3 trillion debt ceiling','2001-12-24 02:26:11','U.S. House of Representatives Speaker John Boehner, the top Republican in Congress who has put forward a deficit reduction plan to be voted on later on Thursday said he had no control over whether his bill would avert a credit downgrade.',generate_series(5,7),'2011-10-11','The Republican-controlled House is tentatively scheduled to vote on Boehner proposal this afternoon at around 6 p.m. EDT (2200 GMT). The main Republican vote counter in the House, Kevin McCarthy, would not say if there were enough votes to pass the bill.','WASHINGTON:House Speaker John Boehner says his plan mixing spending cuts in exchange for raising the nations $14.3 trillion debt limit is not perfect but is as large a step that a divided government can take that is doable and signable by President Barack Obama.The Ohio Republican says the measure is an honest and sincere attempt at compromise and was negotiated with Democrats last weekend and that passing it would end the ongoing debt crisis. The plan blends $900 billion-plus in spending cuts with a companion increase in the nations borrowing cap.','1234.56',323453,generate_series(4,6),7845,'0011','((1,2),(0,3),(2,1))','((2,3)(4,5))','08:00:2b:01:02:03','1-2','Republicans had been working throughout the day Thursday to lock down support for their plan to raise the nations debt ceiling, even as Senate Democrats vowed to swiftly kill it if passed.','((2,3)(4,5))','(6,7)',11.222,'((4,5),7)',32,3214,'(1,0,2,3)','2010-02-21',43564,'$1,000.00','192.168.1','126.1.3.4','12:30:45','Johnson & Johnsons McNeil Consumer Healthcare announced the voluntary dosage reduction today. Labels will carry new dosing instructions this fall.The company says it will cut the maximum dosage of Regular Strength Tylenol and other acetaminophen-containing products in 2012.Acetaminophen is safe when used as directed, says Edwin Kuffner, MD, McNeil vice president of over-the-counter medical affairs. But, when too much is taken, it can cause liver damage.The action is intended to cut the risk of such accidental overdoses, the company says in a news release.','1','0',12,23);
INSERT 0 12
select count(*) from sto_heap2 ;
count
......
......@@ -16,13 +16,12 @@ CREATE TABLE sto_alt_ao1(
before_rename_col int4,
change_datatype_col numeric,
a_ts_without timestamp without time zone,
b_ts_with timestamp with time zone,
date_column date,
col_set_default numeric) with(appendonly=true) DISTRIBUTED RANDOMLY;
insert into sto_alt_ao1 values ('0_zero', 0, '0_zero', 0, 0, 0, '{0}', 0, 0, '2004-10-19 10:23:54', '2004-10-19 10:23:54+02', '1-1-2000',0);
insert into sto_alt_ao1 values ('1_zero', 1, '1_zero', 1, 1, 1, '{1}', 1, 1, '2005-10-19 10:23:54', '2005-10-19 10:23:54+02', '1-1-2001',1);
insert into sto_alt_ao1 values ('2_zero', 2, '2_zero', 2, 2, 2, '{2}', 2, 2, '2006-10-19 10:23:54', '2006-10-19 10:23:54+02', '1-1-2002',2);
insert into sto_alt_ao1 values ('0_zero', 0, '0_zero', 0, 0, 0, '{0}', 0, 0, '2004-10-19 10:23:54', '1-1-2000',0);
insert into sto_alt_ao1 values ('1_zero', 1, '1_zero', 1, 1, 1, '{1}', 1, 1, '2005-10-19 10:23:54', '1-1-2001',1);
insert into sto_alt_ao1 values ('2_zero', 2, '2_zero', 2, 2, 2, '{2}', 2, 2, '2006-10-19 10:23:54', '1-1-2002',2);
select * from sto_alt_ao1 order by bigint_col;
......@@ -34,12 +33,12 @@ Create table sto_alt_ao3 with(appendonly=true) as select * from sto_alt_ao1;
-- Alter table add column
Alter Table sto_alt_ao1 ADD COLUMN added_col character varying(30) default 'default';
insert into sto_alt_ao1 values ('3_zero', 3, '3_zero', 3, 3, 3, '{3}', 3, 3, '2004-10-19 10:23:54', '2004-10-19 10:23:54+02', '1-1-2000',3, 'newcol');
insert into sto_alt_ao1 values ('3_zero', 3, '3_zero', 3, 3, 3, '{3}', 3, 3, '2004-10-19 10:23:54', '1-1-2000',3, 'newcol');
select * from sto_alt_ao1 order by bigint_col;
-- Alter table Drop column
Alter table sto_alt_ao1 Drop column float_col;
insert into sto_alt_ao1 values ('4_zero', 4, '4_zero', 4, 4, '{4}', 4, 4, '2004-10-19 10:23:54', '2004-10-19 10:23:54+02', '1-1-2000',4, 'newcol');
insert into sto_alt_ao1 values ('4_zero', 4, '4_zero', 4, 4, '{4}', 4, 4, '2004-10-19 10:23:54', '1-1-2000',4, 'newcol');
select * from sto_alt_ao1 order by bigint_col;
-- Alter table rename column
......@@ -48,7 +47,7 @@ select * from sto_alt_ao1 order by bigint_col;
-- Alter table column type
Alter Table sto_alt_ao1 ALTER COLUMN change_datatype_col TYPE int4;
insert into sto_alt_ao1 values ('5_zero', 5, '5_zero', 5, 5, '{5}', 5, 5, '2004-10-19 10:23:54', '2004-10-19 10:23:54+02', '1-1-2000',5, 'newcol');
insert into sto_alt_ao1 values ('5_zero', 5, '5_zero', 5, 5, '{5}', 5, 5, '2004-10-19 10:23:54', '1-1-2000',5, 'newcol');
select * from sto_alt_ao1 order by bigint_col;
-- Alter column set default expression
......@@ -69,7 +68,7 @@ select * from sto_alt_ao1 order by bigint_col;
-- Alter table SET STORAGE
Alter Table sto_alt_ao1 ALTER char_vary_col SET STORAGE PLAIN;
insert into sto_alt_ao1 values ('6_zero', 6, '6_zero', 6, 6, '{6}', 6, 6, '2004-10-19 10:23:54', '2004-10-19 10:23:54+02', '1-1-2000',6, 'newcol');
insert into sto_alt_ao1 values ('6_zero', 6, '6_zero', 6, 6, '{6}', 6, 6, '2004-10-19 10:23:54', '1-1-2000',6, 'newcol');
select * from sto_alt_ao1 order by bigint_col;
......
......@@ -16,13 +16,12 @@ CREATE TABLE sto_alt_co1(
before_rename_col int4,
change_datatype_col numeric,
a_ts_without timestamp without time zone,
b_ts_with timestamp with time zone,
date_column date,
col_set_default numeric) with(appendonly=true,orientation=column) DISTRIBUTED RANDOMLY;
insert into sto_alt_co1 values ('0_zero', 0, '0_zero', 0, 0, 0, '{0}', 0, 0, '2004-10-19 10:23:54', '2004-10-19 10:23:54+02', '1-1-2000',0);
insert into sto_alt_co1 values ('1_zero', 1, '1_zero', 1, 1, 1, '{1}', 1, 1, '2005-10-19 10:23:54', '2005-10-19 10:23:54+02', '1-1-2001',1);
insert into sto_alt_co1 values ('2_zero', 2, '2_zero', 2, 2, 2, '{2}', 2, 2, '2006-10-19 10:23:54', '2006-10-19 10:23:54+02', '1-1-2002',2);
insert into sto_alt_co1 values ('0_zero', 0, '0_zero', 0, 0, 0, '{0}', 0, 0, '2004-10-19 10:23:54', '1-1-2000',0);
insert into sto_alt_co1 values ('1_zero', 1, '1_zero', 1, 1, 1, '{1}', 1, 1, '2005-10-19 10:23:54', '1-1-2001',1);
insert into sto_alt_co1 values ('2_zero', 2, '2_zero', 2, 2, 2, '{2}', 2, 2, '2006-10-19 10:23:54', '1-1-2002',2);
select * from sto_alt_co1 order by bigint_col;
-- start_ignore
......@@ -32,12 +31,12 @@ Create table sto_alt_co3 with(appendonly=true,orientation=column) as select * fr
-- Alter table add column
Alter Table sto_alt_co1 ADD COLUMN added_col character varying(30) default 'default';
insert into sto_alt_co1 values ('3_zero', 3, '3_zero', 3, 3, 3, '{3}', 3, 3, '2004-10-19 10:23:54', '2004-10-19 10:23:54+02', '1-1-2000',3, 'newcol');
insert into sto_alt_co1 values ('3_zero', 3, '3_zero', 3, 3, 3, '{3}', 3, 3, '2004-10-19 10:23:54', '1-1-2000',3, 'newcol');
select * from sto_alt_co1 order by bigint_col;
-- Alter table Drop column
Alter table sto_alt_co1 Drop column float_col;
insert into sto_alt_co1 values ('4_zero', 4, '4_zero', 4, 4, '{4}', 4, 4, '2004-10-19 10:23:54', '2004-10-19 10:23:54+02', '1-1-2000',4, 'newcol');
insert into sto_alt_co1 values ('4_zero', 4, '4_zero', 4, 4, '{4}', 4, 4, '2004-10-19 10:23:54', '1-1-2000',4, 'newcol');
select * from sto_alt_co1 order by bigint_col;
-- Alter table rename column
......@@ -46,7 +45,7 @@ select * from sto_alt_co1 order by bigint_col;
-- Alter table column type
Alter Table sto_alt_co1 ALTER COLUMN change_datatype_col TYPE int4;
insert into sto_alt_co1 values ('5_zero', 5, '5_zero', 5, 5, '{5}', 5, 5, '2004-10-19 10:23:54', '2004-10-19 10:23:54+02', '1-1-2000',5, 'newcol');
insert into sto_alt_co1 values ('5_zero', 5, '5_zero', 5, 5, '{5}', 5, 5, '2004-10-19 10:23:54', '1-1-2000',5, 'newcol');
select * from sto_alt_co1 order by bigint_col;
-- Alter column set default expression
......@@ -67,7 +66,7 @@ select * from sto_alt_co1 order by bigint_col;
-- Alter table SET STORAGE
Alter Table sto_alt_co1 ALTER char_vary_col SET STORAGE PLAIN;
insert into sto_alt_co1 values ('6_zero', 6, '6_zero', 6, 6, '{6}', 6, 6, '2004-10-19 10:23:54', '2004-10-19 10:23:54+02', '1-1-2000',6, 'newcol');
insert into sto_alt_co1 values ('6_zero', 6, '6_zero', 6, 6, '{6}', 6, 6, '2004-10-19 10:23:54', '1-1-2000',6, 'newcol');
select * from sto_alt_co1 order by bigint_col;
......
......@@ -15,13 +15,12 @@ CREATE TABLE sto_alt_heap1(
before_rename_col int4,
change_datatype_col numeric,
a_ts_without timestamp without time zone,
b_ts_with timestamp with time zone,
date_column date,
col_set_default numeric)DISTRIBUTED RANDOMLY;
insert into sto_alt_heap1 values ('0_zero', 0, '0_zero', 0, 0, 0, '{0}', 0, 0, '2004-10-19 10:23:54', '2004-10-19 10:23:54+02', '1-1-2000',0);
insert into sto_alt_heap1 values ('1_zero', 1, '1_zero', 1, 1, 1, '{1}', 1, 1, '2005-10-19 10:23:54', '2005-10-19 10:23:54+02', '1-1-2001',1);
insert into sto_alt_heap1 values ('2_zero', 2, '2_zero', 2, 2, 2, '{2}', 2, 2, '2006-10-19 10:23:54', '2006-10-19 10:23:54+02', '1-1-2002',2);
insert into sto_alt_heap1 values ('0_zero', 0, '0_zero', 0, 0, 0, '{0}', 0, 0, '2004-10-19 10:23:54', '1-1-2000',0);
insert into sto_alt_heap1 values ('1_zero', 1, '1_zero', 1, 1, 1, '{1}', 1, 1, '2005-10-19 10:23:54', '1-1-2001',1);
insert into sto_alt_heap1 values ('2_zero', 2, '2_zero', 2, 2, 2, '{2}', 2, 2, '2006-10-19 10:23:54', '1-1-2002',2);
select * from sto_alt_heap1 order by bigint_col;
......@@ -32,12 +31,12 @@ Create table sto_alt_heap3 as select * from sto_alt_heap1;
-- Alter table add column
Alter Table sto_alt_heap1 ADD COLUMN added_col character varying(30) default 'default';
insert into sto_alt_heap1 values ('3_zero', 3, '3_zero', 3, 3, 3, '{3}', 3, 3, '2004-10-19 10:23:54', '2004-10-19 10:23:54+02', '1-1-2000',3, 'newcol');
insert into sto_alt_heap1 values ('3_zero', 3, '3_zero', 3, 3, 3, '{3}', 3, 3, '2004-10-19 10:23:54', '1-1-2000',3, 'newcol');
select * from sto_alt_heap1 order by bigint_col;
-- Alter table Drop column
Alter table sto_alt_heap1 Drop column float_col;
insert into sto_alt_heap1 values ('4_zero', 4, '4_zero', 4, 4, '{4}', 4, 4, '2004-10-19 10:23:54', '2004-10-19 10:23:54+02', '1-1-2000',4, 'newcol');
insert into sto_alt_heap1 values ('4_zero', 4, '4_zero', 4, 4, '{4}', 4, 4, '2004-10-19 10:23:54', '1-1-2000',4, 'newcol');
select * from sto_alt_heap1 order by bigint_col;
-- Alter table rename column
......@@ -46,7 +45,7 @@ select * from sto_alt_heap1 order by bigint_col;
-- Alter table column type
Alter Table sto_alt_heap1 ALTER COLUMN change_datatype_col TYPE int4;
insert into sto_alt_heap1 values ('5_zero', 5, '5_zero', 5, 5, '{5}', 5, 5, '2004-10-19 10:23:54', '2004-10-19 10:23:54+02', '1-1-2000',5, 'newcol');
insert into sto_alt_heap1 values ('5_zero', 5, '5_zero', 5, 5, '{5}', 5, 5, '2004-10-19 10:23:54', '1-1-2000',5, 'newcol');
select * from sto_alt_heap1 order by bigint_col;
-- Alter column set default expression
......@@ -67,7 +66,7 @@ select * from sto_alt_heap1 order by bigint_col;
-- Alter table SET STORAGE
Alter Table sto_alt_heap1 ALTER char_vary_col SET STORAGE PLAIN;
insert into sto_alt_heap1 values ('6_zero', 6, '6_zero', 6, 6, '{6}', 6, 6, '2004-10-19 10:23:54', '2004-10-19 10:23:54+02', '1-1-2000',6, 'newcol');
insert into sto_alt_heap1 values ('6_zero', 6, '6_zero', 6, 6, '{6}', 6, 6, '2004-10-19 10:23:54', '1-1-2000',6, 'newcol');
select * from sto_alt_heap1 order by bigint_col;
......
......@@ -29,9 +29,9 @@ select * from sto_ao1 order by col_numeric;
--start_ignore
Drop table if exists sto_ao2;
--end_ignore
Create table sto_ao2 (id SERIAL,a1 int,a2 char(5),a3 numeric,a4 boolean DEFAULT false ,a5 char DEFAULT 'd',a6 text,a7 timestamp,a8 character varying(705),a9 bigint,a10 date,a11 varchar(600),a12 text,a13 decimal,a14 real,a15 bigint,a16 int4 ,a17 bytea,a18 timestamp with time zone,a19 timetz,a20 path,a21 box,a22 macaddr,a23 interval,a24 character varying(800),a25 lseg,a26 point,a27 double precision,a28 circle,a29 int4,a30 numeric(8),a31 polygon,a32 date,a33 real,a34 money,a35 cidr,a36 inet,a37 time,a38 text,a39 bit,a40 bit varying(5),a41 smallint,a42 int ) with(appendonly=true) distributed randomly;
Create table sto_ao2 (id SERIAL,a1 int,a2 char(5),a3 numeric,a4 boolean DEFAULT false ,a5 char DEFAULT 'd',a6 text,a7 timestamp,a8 character varying(705),a9 bigint,a10 date,a11 varchar(600),a12 text,a13 decimal,a14 real,a15 bigint,a16 int4 ,a17 bytea,a20 path,a21 box,a22 macaddr,a23 interval,a24 character varying(800),a25 lseg,a26 point,a27 double precision,a28 circle,a29 int4,a30 numeric(8),a31 polygon,a32 date,a33 real,a34 money,a35 cidr,a36 inet,a37 time,a38 text,a39 bit,a40 bit varying(5),a41 smallint,a42 int ) with(appendonly=true) distributed randomly;
INSERT INTO sto_ao2 (a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,a16,a17,a18,a19,a20,a21,a22,a23,a24,a25,a26,a27,a28,a29,a30,a31,a32,a33,a34,a35,a36,a37,a38,a39,a40,a41,a42) values(generate_series(1,4),'M',2011,'t','a','This is news of today: Deadlock between Republicans and Democrats over how best to reduce the U.S. deficit, and over what period, has blocked an agreement to allow the raising of the $14.3 trillion debt ceiling','2001-12-24 02:26:11','U.S. House of Representatives Speaker John Boehner, the top Republican in Congress who has put forward a deficit reduction plan to be voted on later on Thursday said he had no control over whether his bill would avert a credit downgrade.',generate_series(5,7),'2011-10-11','The Republican-controlled House is tentatively scheduled to vote on Boehner proposal this afternoon at around 6 p.m. EDT (2200 GMT). The main Republican vote counter in the House, Kevin McCarthy, would not say if there were enough votes to pass the bill.','WASHINGTON:House Speaker John Boehner says his plan mixing spending cuts in exchange for raising the nations $14.3 trillion debt limit is not perfect but is as large a step that a divided government can take that is doable and signable by President Barack Obama.The Ohio Republican says the measure is an honest and sincere attempt at compromise and was negotiated with Democrats last weekend and that passing it would end the ongoing debt crisis. The plan blends $900 billion-plus in spending cuts with a companion increase in the nations borrowing cap.','1234.56',323453,generate_series(4,6),7845,'0011','2005-07-16 01:51:15+1359','2001-12-13 01:51:15','((1,2),(0,3),(2,1))','((2,3)(4,5))','08:00:2b:01:02:03','1-2','Republicans had been working throughout the day Thursday to lock down support for their plan to raise the nations debt ceiling, even as Senate Democrats vowed to swiftly kill it if passed.','((2,3)(4,5))','(6,7)',11.222,'((4,5),7)',32,3214,'(1,0,2,3)','2010-02-21',43564,'$1,000.00','192.168.1','126.1.3.4','12:30:45','Johnson & Johnsons McNeil Consumer Healthcare announced the voluntary dosage reduction today. Labels will carry new dosing instructions this fall.The company says it will cut the maximum dosage of Regular Strength Tylenol and other acetaminophen-containing products in 2012.Acetaminophen is safe when used as directed, says Edwin Kuffner, MD, McNeil vice president of over-the-counter medical affairs. But, when too much is taken, it can cause liver damage.The action is intended to cut the risk of such accidental overdoses, the company says in a news release.','1','0',12,23);
INSERT INTO sto_ao2 (a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,a16,a17,a20,a21,a22,a23,a24,a25,a26,a27,a28,a29,a30,a31,a32,a33,a34,a35,a36,a37,a38,a39,a40,a41,a42) values(generate_series(1,4),'M',2011,'t','a','This is news of today: Deadlock between Republicans and Democrats over how best to reduce the U.S. deficit, and over what period, has blocked an agreement to allow the raising of the $14.3 trillion debt ceiling','2001-12-24 02:26:11','U.S. House of Representatives Speaker John Boehner, the top Republican in Congress who has put forward a deficit reduction plan to be voted on later on Thursday said he had no control over whether his bill would avert a credit downgrade.',generate_series(5,7),'2011-10-11','The Republican-controlled House is tentatively scheduled to vote on Boehner proposal this afternoon at around 6 p.m. EDT (2200 GMT). The main Republican vote counter in the House, Kevin McCarthy, would not say if there were enough votes to pass the bill.','WASHINGTON:House Speaker John Boehner says his plan mixing spending cuts in exchange for raising the nations $14.3 trillion debt limit is not perfect but is as large a step that a divided government can take that is doable and signable by President Barack Obama.The Ohio Republican says the measure is an honest and sincere attempt at compromise and was negotiated with Democrats last weekend and that passing it would end the ongoing debt crisis. The plan blends $900 billion-plus in spending cuts with a companion increase in the nations borrowing cap.','1234.56',323453,generate_series(4,6),7845,'0011','((1,2),(0,3),(2,1))','((2,3)(4,5))','08:00:2b:01:02:03','1-2','Republicans had been working throughout the day Thursday to lock down support for their plan to raise the nations debt ceiling, even as Senate Democrats vowed to swiftly kill it if passed.','((2,3)(4,5))','(6,7)',11.222,'((4,5),7)',32,3214,'(1,0,2,3)','2010-02-21',43564,'$1,000.00','192.168.1','126.1.3.4','12:30:45','Johnson & Johnsons McNeil Consumer Healthcare announced the voluntary dosage reduction today. Labels will carry new dosing instructions this fall.The company says it will cut the maximum dosage of Regular Strength Tylenol and other acetaminophen-containing products in 2012.Acetaminophen is safe when used as directed, says Edwin Kuffner, MD, McNeil vice president of over-the-counter medical affairs. But, when too much is taken, it can cause liver damage.The action is intended to cut the risk of such accidental overdoses, the company says in a news release.','1','0',12,23);
select count(*) from sto_ao2;
......
......@@ -29,9 +29,9 @@ select * from sto_co1 order by col_numeric;
--start_ignore
Drop table if exists sto_co2;
--end_ignore
Create table sto_co2 (id SERIAL,a1 int,a2 char(5),a3 numeric,a4 boolean DEFAULT false ,a5 char DEFAULT 'd',a6 text,a7 timestamp,a8 character varying(705),a9 bigint,a10 date,a11 varchar(600),a12 text,a13 decimal,a14 real,a15 bigint,a16 int4 ,a17 bytea,a18 timestamp with time zone,a19 timetz,a20 path,a21 box,a22 macaddr,a23 interval,a24 character varying(800),a25 lseg,a26 point,a27 double precision,a28 circle,a29 int4,a30 numeric(8),a31 polygon,a32 date,a33 real,a34 money,a35 cidr,a36 inet,a37 time,a38 text,a39 bit,a40 bit varying(5),a41 smallint,a42 int ) with(appendonly=true,orientation=column) distributed randomly;
Create table sto_co2 (id SERIAL,a1 int,a2 char(5),a3 numeric,a4 boolean DEFAULT false ,a5 char DEFAULT 'd',a6 text,a7 timestamp,a8 character varying(705),a9 bigint,a10 date,a11 varchar(600),a12 text,a13 decimal,a14 real,a15 bigint,a16 int4 ,a17 bytea,a20 path,a21 box,a22 macaddr,a23 interval,a24 character varying(800),a25 lseg,a26 point,a27 double precision,a28 circle,a29 int4,a30 numeric(8),a31 polygon,a32 date,a33 real,a34 money,a35 cidr,a36 inet,a37 time,a38 text,a39 bit,a40 bit varying(5),a41 smallint,a42 int ) with(appendonly=true,orientation=column) distributed randomly;
INSERT INTO sto_co2 (a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,a16,a17,a18,a19,a20,a21,a22,a23,a24,a25,a26,a27,a28,a29,a30,a31,a32,a33,a34,a35,a36,a37,a38,a39,a40,a41,a42) values(generate_series(1,4),'M',2011,'t','a','This is news of today: Deadlock between Republicans and Democrats over how best to reduce the U.S. deficit, and over what period, has blocked an agreement to allow the raising of the $14.3 trillion debt ceiling','2001-12-24 02:26:11','U.S. House of Representatives Speaker John Boehner, the top Republican in Congress who has put forward a deficit reduction plan to be voted on later on Thursday said he had no control over whether his bill would avert a credit downgrade.',generate_series(5,7),'2011-10-11','The Republican-controlled House is tentatively scheduled to vote on Boehner proposal this afternoon at around 6 p.m. EDT (2200 GMT). The main Republican vote counter in the House, Kevin McCarthy, would not say if there were enough votes to pass the bill.','WASHINGTON:House Speaker John Boehner says his plan mixing spending cuts in exchange for raising the nations $14.3 trillion debt limit is not perfect but is as large a step that a divided government can take that is doable and signable by President Barack Obama.The Ohio Republican says the measure is an honest and sincere attempt at compromise and was negotiated with Democrats last weekend and that passing it would end the ongoing debt crisis. The plan blends $900 billion-plus in spending cuts with a companion increase in the nations borrowing cap.','1234.56',323453,generate_series(4,6),7845,'0011','2005-07-16 01:51:15+1359','2001-12-13 01:51:15','((1,2),(0,3),(2,1))','((2,3)(4,5))','08:00:2b:01:02:03','1-2','Republicans had been working throughout the day Thursday to lock down support for their plan to raise the nations debt ceiling, even as Senate Democrats vowed to swiftly kill it if passed.','((2,3)(4,5))','(6,7)',11.222,'((4,5),7)',32,3214,'(1,0,2,3)','2010-02-21',43564,'$1,000.00','192.168.1','126.1.3.4','12:30:45','Johnson & Johnsons McNeil Consumer Healthcare announced the voluntary dosage reduction today. Labels will carry new dosing instructions this fall.The company says it will cut the maximum dosage of Regular Strength Tylenol and other acetaminophen-containing products in 2012.Acetaminophen is safe when used as directed, says Edwin Kuffner, MD, McNeil vice president of over-the-counter medical affairs. But, when too much is taken, it can cause liver damage.The action is intended to cut the risk of such accidental overdoses, the company says in a news release.','1','0',12,23);
INSERT INTO sto_co2 (a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,a16,a17,a20,a21,a22,a23,a24,a25,a26,a27,a28,a29,a30,a31,a32,a33,a34,a35,a36,a37,a38,a39,a40,a41,a42) values(generate_series(1,4),'M',2011,'t','a','This is news of today: Deadlock between Republicans and Democrats over how best to reduce the U.S. deficit, and over what period, has blocked an agreement to allow the raising of the $14.3 trillion debt ceiling','2001-12-24 02:26:11','U.S. House of Representatives Speaker John Boehner, the top Republican in Congress who has put forward a deficit reduction plan to be voted on later on Thursday said he had no control over whether his bill would avert a credit downgrade.',generate_series(5,7),'2011-10-11','The Republican-controlled House is tentatively scheduled to vote on Boehner proposal this afternoon at around 6 p.m. EDT (2200 GMT). The main Republican vote counter in the House, Kevin McCarthy, would not say if there were enough votes to pass the bill.','WASHINGTON:House Speaker John Boehner says his plan mixing spending cuts in exchange for raising the nations $14.3 trillion debt limit is not perfect but is as large a step that a divided government can take that is doable and signable by President Barack Obama.The Ohio Republican says the measure is an honest and sincere attempt at compromise and was negotiated with Democrats last weekend and that passing it would end the ongoing debt crisis. The plan blends $900 billion-plus in spending cuts with a companion increase in the nations borrowing cap.','1234.56',323453,generate_series(4,6),7845,'0011','((1,2),(0,3),(2,1))','((2,3)(4,5))','08:00:2b:01:02:03','1-2','Republicans had been working throughout the day Thursday to lock down support for their plan to raise the nations debt ceiling, even as Senate Democrats vowed to swiftly kill it if passed.','((2,3)(4,5))','(6,7)',11.222,'((4,5),7)',32,3214,'(1,0,2,3)','2010-02-21',43564,'$1,000.00','192.168.1','126.1.3.4','12:30:45','Johnson & Johnsons McNeil Consumer Healthcare announced the voluntary dosage reduction today. Labels will carry new dosing instructions this fall.The company says it will cut the maximum dosage of Regular Strength Tylenol and other acetaminophen-containing products in 2012.Acetaminophen is safe when used as directed, says Edwin Kuffner, MD, McNeil vice president of over-the-counter medical affairs. But, when too much is taken, it can cause liver damage.The action is intended to cut the risk of such accidental overdoses, the company says in a news release.','1','0',12,23);
select count(*) from sto_co2;
......
......@@ -33,9 +33,9 @@ select * from sto_heap1 order by col_numeric;
--start_ignore
Drop table if exists sto_heap2;
--end_ignore
Create table sto_heap2 (id SERIAL,a1 int,a2 char(5),a3 numeric,a4 boolean DEFAULT false ,a5 char DEFAULT 'd',a6 text,a7 timestamp,a8 character varying(705),a9 bigint,a10 date,a11 varchar(600),a12 text,a13 decimal,a14 real,a15 bigint,a16 int4 ,a17 bytea,a18 timestamp with time zone,a19 timetz,a20 path,a21 box,a22 macaddr,a23 interval,a24 character varying(800),a25 lseg,a26 point,a27 double precision,a28 circle,a29 int4,a30 numeric(8),a31 polygon,a32 date,a33 real,a34 money,a35 cidr,a36 inet,a37 time,a38 text,a39 bit,a40 bit varying(5),a41 smallint,a42 int ) distributed randomly;
Create table sto_heap2 (id SERIAL,a1 int,a2 char(5),a3 numeric,a4 boolean DEFAULT false ,a5 char DEFAULT 'd',a6 text,a7 timestamp,a8 character varying(705),a9 bigint,a10 date,a11 varchar(600),a12 text,a13 decimal,a14 real,a15 bigint,a16 int4 ,a17 bytea,a20 path,a21 box,a22 macaddr,a23 interval,a24 character varying(800),a25 lseg,a26 point,a27 double precision,a28 circle,a29 int4,a30 numeric(8),a31 polygon,a32 date,a33 real,a34 money,a35 cidr,a36 inet,a37 time,a38 text,a39 bit,a40 bit varying(5),a41 smallint,a42 int ) distributed randomly;
INSERT INTO sto_heap2 (a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,a16,a17,a18,a19,a20,a21,a22,a23,a24,a25,a26,a27,a28,a29,a30,a31,a32,a33,a34,a35,a36,a37,a38,a39,a40,a41,a42) values(generate_series(1,4),'M',2011,'t','a','This is news of today: Deadlock between Republicans and Democrats over how best to reduce the U.S. deficit, and over what period, has blocked an agreement to allow the raising of the $14.3 trillion debt ceiling','2001-12-24 02:26:11','U.S. House of Representatives Speaker John Boehner, the top Republican in Congress who has put forward a deficit reduction plan to be voted on later on Thursday said he had no control over whether his bill would avert a credit downgrade.',generate_series(5,7),'2011-10-11','The Republican-controlled House is tentatively scheduled to vote on Boehner proposal this afternoon at around 6 p.m. EDT (2200 GMT). The main Republican vote counter in the House, Kevin McCarthy, would not say if there were enough votes to pass the bill.','WASHINGTON:House Speaker John Boehner says his plan mixing spending cuts in exchange for raising the nations $14.3 trillion debt limit is not perfect but is as large a step that a divided government can take that is doable and signable by President Barack Obama.The Ohio Republican says the measure is an honest and sincere attempt at compromise and was negotiated with Democrats last weekend and that passing it would end the ongoing debt crisis. The plan blends $900 billion-plus in spending cuts with a companion increase in the nations borrowing cap.','1234.56',323453,generate_series(4,6),7845,'0011','2005-07-16 01:51:15+1359','2001-12-13 01:51:15','((1,2),(0,3),(2,1))','((2,3)(4,5))','08:00:2b:01:02:03','1-2','Republicans had been working throughout the day Thursday to lock down support for their plan to raise the nations debt ceiling, even as Senate Democrats vowed to swiftly kill it if passed.','((2,3)(4,5))','(6,7)',11.222,'((4,5),7)',32,3214,'(1,0,2,3)','2010-02-21',43564,'$1,000.00','192.168.1','126.1.3.4','12:30:45','Johnson & Johnsons McNeil Consumer Healthcare announced the voluntary dosage reduction today. Labels will carry new dosing instructions this fall.The company says it will cut the maximum dosage of Regular Strength Tylenol and other acetaminophen-containing products in 2012.Acetaminophen is safe when used as directed, says Edwin Kuffner, MD, McNeil vice president of over-the-counter medical affairs. But, when too much is taken, it can cause liver damage.The action is intended to cut the risk of such accidental overdoses, the company says in a news release.','1','0',12,23);
INSERT INTO sto_heap2 (a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,a16,a17,a20,a21,a22,a23,a24,a25,a26,a27,a28,a29,a30,a31,a32,a33,a34,a35,a36,a37,a38,a39,a40,a41,a42) values(generate_series(1,4),'M',2011,'t','a','This is news of today: Deadlock between Republicans and Democrats over how best to reduce the U.S. deficit, and over what period, has blocked an agreement to allow the raising of the $14.3 trillion debt ceiling','2001-12-24 02:26:11','U.S. House of Representatives Speaker John Boehner, the top Republican in Congress who has put forward a deficit reduction plan to be voted on later on Thursday said he had no control over whether his bill would avert a credit downgrade.',generate_series(5,7),'2011-10-11','The Republican-controlled House is tentatively scheduled to vote on Boehner proposal this afternoon at around 6 p.m. EDT (2200 GMT). The main Republican vote counter in the House, Kevin McCarthy, would not say if there were enough votes to pass the bill.','WASHINGTON:House Speaker John Boehner says his plan mixing spending cuts in exchange for raising the nations $14.3 trillion debt limit is not perfect but is as large a step that a divided government can take that is doable and signable by President Barack Obama.The Ohio Republican says the measure is an honest and sincere attempt at compromise and was negotiated with Democrats last weekend and that passing it would end the ongoing debt crisis. The plan blends $900 billion-plus in spending cuts with a companion increase in the nations borrowing cap.','1234.56',323453,generate_series(4,6),7845,'0011','((1,2),(0,3),(2,1))','((2,3)(4,5))','08:00:2b:01:02:03','1-2','Republicans had been working throughout the day Thursday to lock down support for their plan to raise the nations debt ceiling, even as Senate Democrats vowed to swiftly kill it if passed.','((2,3)(4,5))','(6,7)',11.222,'((4,5),7)',32,3214,'(1,0,2,3)','2010-02-21',43564,'$1,000.00','192.168.1','126.1.3.4','12:30:45','Johnson & Johnsons McNeil Consumer Healthcare announced the voluntary dosage reduction today. Labels will carry new dosing instructions this fall.The company says it will cut the maximum dosage of Regular Strength Tylenol and other acetaminophen-containing products in 2012.Acetaminophen is safe when used as directed, says Edwin Kuffner, MD, McNeil vice president of over-the-counter medical affairs. But, when too much is taken, it can cause liver damage.The action is intended to cut the risk of such accidental overdoses, the company says in a news release.','1','0',12,23);
select count(*) from sto_heap2 ;
......
......@@ -3,16 +3,15 @@ DROP TABLE IF EXISTS heap_tbl;
psql:/path/sql_file:1: NOTICE: table "heap_tbl" does not exist, skipping
DROP TABLE
-- end_ignore
CREATE TABLE heap_tbl
(id SERIAL,a1 int,a2 char(5),a3 numeric,a4 boolean DEFAULT false ,a5 char DEFAULT 'd',a6 text,a7 timestamp,a8 character varying(705),a9 bigint,a10 date,a11 varchar(600),a12 text,a13 decimal,a14 real,a15 bigint,a16 int4 ,a17 bytea,a18 timestamp with time zone,a19 timetz,a20 path,a21 box,a22 macaddr,a23 interval,a24 character varying(800),a25 lseg,a26 point,a27 double precision,a28 circle,a29 int4,a30 numeric(8),a31 polygon,a32 date,a33 real,a34 money,a35 cidr,a36 inet,
(id SERIAL,a1 int,a2 char(5),a3 numeric,a4 boolean DEFAULT false ,a5 char DEFAULT 'd',a6 text,a7 timestamp,a8 character varying(705),a9 bigint,a10 date,a11 varchar(600),a12 text,a13 decimal,a14 real,a15 bigint,a16 int4 ,a17 bytea,a20 path,a21 box,a22 macaddr,a23 interval,a24 character varying(800),a25 lseg,a26 point,a27 double precision,a28 circle,a29 int4,a30 numeric(8),a31 polygon,a32 date,a33 real,a34 money,a35 cidr,a36 inet,
a37 time,a38 text,a39 bit,a40 bit varying(5),a41 smallint,a42 int ) WITH (appendonly=false) distributed randomly;
psql:/path/sql_file:1: NOTICE: CREATE TABLE will create implicit sequence "heap_tbl_id_seq" for serial column "heap_tbl.id"
CREATE TABLE
--Insert data to the table
INSERT INTO heap_tbl(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,a16,a17,a18,a19,a20,a21,a22,a23,a24,a25,a26,a27,a28,a29,a30,a31,a32,a33,a34,a35,a36,a37,a38,a39,a40,a41,a42) values(generate_series(1,20),'M',2011,'t','a','This is news of today: Deadlock between Republicans and Democrats over how best to reduce the U.S. deficit, and over what period, has blocked an agreement to allow the raising of the $14.3 trillion debt ceiling','2001-12-24 02:26:11','U.S. House of Representatives Speaker John Boehner, the top Republican in Congress who has put forward a deficit reduction plan to be voted on later on Thursday said he had no control over whether his bill would avert a credit downgrade.',generate_series(2490,2505),'2011-10-11','The Republican-controlled House is tentatively scheduled to vote on Boehner proposal this afternoon at around 6 p.m. EDT (2200 GMT). The main Republican vote counter in the House, Kevin McCarthy, would not say if there were enough votes to pass the bill.','WASHINGTON:House Speaker John Boehner says his plan mixing spending cuts in exchange for raising the nations $14.3 trillion debt limit is not perfect but is as large a step that a divided government can take that is doable and signable by President Barack Obama.The Ohio Republican says the measure is an honest and sincere attempt at compromise and was negotiated with Democrats last weekend and that passing it would end the ongoing debt crisis. The plan blends $900 billion-plus in spending cuts with a companion increase in the nations borrowing cap.','1234.56',323453,generate_series(3452,3462),7845,'0011','2005-07-16 01:51:15+1359','2001-12-13 01:51:15','((1,2),(0,3),(2,1))','((2,3)(4,5))','08:00:2b:01:02:03','1-2','Republicans had been working throughout the day Thursday to lock down support for their plan to raise the nations debt ceiling, even as Senate Democrats vowed to swiftly kill it if passed.','((2,3)(4,5))','(6,7)',11.222,'((4,5),7)',32,3214,'(1,0,2,3)','2010-02-21',43564,'$1,000.00','192.168.1','126.1.3.4','12:30:45','Johnson & Johnsons McNeil Consumer Healthcare announced the voluntary dosage reduction today. Labels will carry new dosing instructions this fall.The company says it will cut the maximum dosage of Regular Strength Tylenol and other acetaminophen-containing products in 2012.Acetaminophen is safe when used as directed, says Edwin Kuffner, MD, McNeil vice president of over-the-counter medical affairs. But, when too much is taken, it can cause liver damage.The action is intended to cut the risk of such accidental overdoses, the company says in a news release.','1','0',12,23);
INSERT INTO heap_tbl(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,a16,a17,a20,a21,a22,a23,a24,a25,a26,a27,a28,a29,a30,a31,a32,a33,a34,a35,a36,a37,a38,a39,a40,a41,a42) values(generate_series(1,20),'M',2011,'t','a','This is news of today: Deadlock between Republicans and Democrats over how best to reduce the U.S. deficit, and over what period, has blocked an agreement to allow the raising of the $14.3 trillion debt ceiling','2001-12-24 02:26:11','U.S. House of Representatives Speaker John Boehner, the top Republican in Congress who has put forward a deficit reduction plan to be voted on later on Thursday said he had no control over whether his bill would avert a credit downgrade.',generate_series(2490,2505),'2011-10-11','The Republican-controlled House is tentatively scheduled to vote on Boehner proposal this afternoon at around 6 p.m. EDT (2200 GMT). The main Republican vote counter in the House, Kevin McCarthy, would not say if there were enough votes to pass the bill.','WASHINGTON:House Speaker John Boehner says his plan mixing spending cuts in exchange for raising the nations $14.3 trillion debt limit is not perfect but is as large a step that a divided government can take that is doable and signable by President Barack Obama.The Ohio Republican says the measure is an honest and sincere attempt at compromise and was negotiated with Democrats last weekend and that passing it would end the ongoing debt crisis. The plan blends $900 billion-plus in spending cuts with a companion increase in the nations borrowing cap.','1234.56',323453,generate_series(3452,3462),7845,'0011','((1,2),(0,3),(2,1))','((2,3)(4,5))','08:00:2b:01:02:03','1-2','Republicans had been working throughout the day Thursday to lock down support for their plan to raise the nations debt ceiling, even as Senate Democrats vowed to swiftly kill it if passed.','((2,3)(4,5))','(6,7)',11.222,'((4,5),7)',32,3214,'(1,0,2,3)','2010-02-21',43564,'$1,000.00','192.168.1','126.1.3.4','12:30:45','Johnson & Johnsons McNeil Consumer Healthcare announced the voluntary dosage reduction today. Labels will carry new dosing instructions this fall.The company says it will cut the maximum dosage of Regular Strength Tylenol and other acetaminophen-containing products in 2012.Acetaminophen is safe when used as directed, says Edwin Kuffner, MD, McNeil vice president of over-the-counter medical affairs. But, when too much is taken, it can cause liver damage.The action is intended to cut the risk of such accidental overdoses, the company says in a news release.','1','0',12,23);
INSERT 0 880
INSERT INTO heap_tbl(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,a16,a17,a18,a19,a20,a21,a22,a23,a24,a25,a26,a27,a28,a29,a30,a31,a32,a33,a34,a35,a36,a37,a38,a39,a40,a41,a42) values(generate_series(500,510),'F',2010,'f','b','Some students may need time to adjust to school.For most children, the adjustment is quick. Tears will usually disappear after Mommy and Daddy leave the classroom. Do not plead with your child','2001-12-25 02:22:11','Some students may need time to adjust to school.For most children, the adjustment is quick. Tears will usually disappear after Mommy and Daddy leave the classroom. Do not plead with your child',generate_series(2500,2516),'2011-10-12','Some students may need time to adjust to school.For most children, the adjustment is quick. Tears will usually disappear after Mommy and Daddy leave the classroom. Do not plead with your child','Some students may need time to adjust to school.For most children, the adjustment is quick. Tears will usually disappear after Mommy and Daddy leave the classroom. Do not plead with your child The type integer is the usual choice, as it offers the best balance between range, storage size, and performance The type integer is the usual choice, as it offers the best balance between range, storage size, and performanceThe type integer is the usual choice, as it offers the best balance between range, storage size, and performanceThe type integer is the usual choice, as it offers the best balance between range, storage size, and performanceThe type integer ','1134.26',311353,generate_series(3982,3992),7885,'0101','2002-02-12 01:31:14+1344','2003-11-14 01:41:15','((1,1),(0,1),(1,1))','((2,1)(1,5))','08:00:2b:01:01:03','1-3','Some students may need time to adjust to school.For most children, the adjustment is quick. Tears will usually disappear after Mommy and Daddy leave the classroom. Do not plead with your child The types smallint, integer, and bigint store whole numbers, that is, numbers without fractional components, of various ranges. The types smallint, integer, and bigint store whole numbers, that is, numbers without fractional components, of various ranges. Attempts to store values outside of the allowed range will result in an errorThe types smallint, integer, and bigint store whole numbers, that is, numbers without fractional components, of various ranges.','((6,5)(4,2))','(3,6)',12.233,'((5,4),2)',12,3114,'(1,1,0,3)','2010-03-21',43164,'$1,500.00','192.167.2','126.1.1.1','10:30:55','Parents and other family members are always welcome at Stratford. After the first two weeks ofschool','0','1',33,44);
INSERT INTO heap_tbl(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,a16,a17,a20,a21,a22,a23,a24,a25,a26,a27,a28,a29,a30,a31,a32,a33,a34,a35,a36,a37,a38,a39,a40,a41,a42) values(generate_series(500,510),'F',2010,'f','b','Some students may need time to adjust to school.For most children, the adjustment is quick. Tears will usually disappear after Mommy and Daddy leave the classroom. Do not plead with your child','2001-12-25 02:22:11','Some students may need time to adjust to school.For most children, the adjustment is quick. Tears will usually disappear after Mommy and Daddy leave the classroom. Do not plead with your child',generate_series(2500,2516),'2011-10-12','Some students may need time to adjust to school.For most children, the adjustment is quick. Tears will usually disappear after Mommy and Daddy leave the classroom. Do not plead with your child','Some students may need time to adjust to school.For most children, the adjustment is quick. Tears will usually disappear after Mommy and Daddy leave the classroom. Do not plead with your child The type integer is the usual choice, as it offers the best balance between range, storage size, and performance The type integer is the usual choice, as it offers the best balance between range, storage size, and performanceThe type integer is the usual choice, as it offers the best balance between range, storage size, and performanceThe type integer is the usual choice, as it offers the best balance between range, storage size, and performanceThe type integer ','1134.26',311353,generate_series(3982,3992),7885,'0101','((1,1),(0,1),(1,1))','((2,1)(1,5))','08:00:2b:01:01:03','1-3','Some students may need time to adjust to school.For most children, the adjustment is quick. Tears will usually disappear after Mommy and Daddy leave the classroom. Do not plead with your child The types smallint, integer, and bigint store whole numbers, that is, numbers without fractional components, of various ranges. The types smallint, integer, and bigint store whole numbers, that is, numbers without fractional components, of various ranges. Attempts to store values outside of the allowed range will result in an errorThe types smallint, integer, and bigint store whole numbers, that is, numbers without fractional components, of various ranges.','((6,5)(4,2))','(3,6)',12.233,'((5,4),2)',12,3114,'(1,1,0,3)','2010-03-21',43164,'$1,500.00','192.167.2','126.1.1.1','10:30:55','Parents and other family members are always welcome at Stratford. After the first two weeks ofschool','0','1',33,44);
INSERT 0 187
DELETE FROM heap_tbl WHERE a1 < 5;
DELETE 176
......@@ -485,3 +484,4 @@ SELECT count(*) FROM heap_tbl;
-------
451
(1 row)
......@@ -10,7 +10,7 @@ CREATE EXTERNAL TABLE test_quote1( i text)
location ('file://rh55-qavm65/tmp/quote.csv' )
FORMAT 'csv' (delimiter '|' quote '''') ;
CREATE EXTERNAL TABLE
select * from test_quote1 order by i;
select * from test_quote1;
i
-----
a
......@@ -21,9 +21,10 @@ CREATE EXTERNAL TABLE test_quote2( i text)
location ('file://rh55-qavm65/tmp/quote.csv' )
FORMAT 'csv' (delimiter '|' quote '"') ;
CREATE EXTERNAL TABLE
select * from test_quote2 order by i;
select * from test_quote2;
i
-----
'a'
b
(2 rows)
......@@ -4,7 +4,7 @@ DROP TABLE
DROP TABLE IF EXISTS new_ao_table;
DROP TABLE
-- end_ignore
CREATE TABLE ao_table ( a int,col001 char DEFAULT 'z',col002 numeric,col003 boolean DEFAULT false,col004 bit(3) DEFAULT '111',col005 text DEFAULT 'pookie', col006 integer[] DEFAULT '{5, 4, 3, 2, 1}', col007 character varying(512) DEFAULT 'Now is the time', col008 character varying DEFAULT 'Now is the time', col009 character varying(512)[], col010 numeric(8),col011 int,col012 double precision, col013 bigint, col014 char(8), col015 bytea,col016 timestamp with time zone,col017 interval, col018 cidr, col019 inet, col020 macaddr,col022 money, col025 circle, col026 box, col027 name,col028 path, col029 int2, col031 bit varying(256),col032 date, col034 lseg,col035 point,col036 polygon,col037 real,col039 time, col040 timestamp )with (appendonly=true);
CREATE TABLE ao_table ( a int,col001 char DEFAULT 'z',col002 numeric,col003 boolean DEFAULT false,col004 bit(3) DEFAULT '111',col005 text DEFAULT 'pookie', col006 integer[] DEFAULT '{5, 4, 3, 2, 1}', col007 character varying(512) DEFAULT 'Now is the time', col008 character varying DEFAULT 'Now is the time', col009 character varying(512)[], col010 numeric(8),col011 int,col012 double precision, col013 bigint, col014 char(8), col015 bytea,col017 interval, col018 cidr, col019 inet, col020 macaddr,col022 money, col025 circle, col026 box, col027 name,col028 path, col029 int2, col031 bit varying(256),col032 date, col034 lseg,col035 point,col036 polygon,col037 real,col039 time, col040 timestamp )with (appendonly=true);
psql:/path/sql_file:1: NOTICE: Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'a' as the Greenplum Database data distribution key for this table.
HINT: The 'DISTRIBUTED BY' clause determines the distribution of data. Make sure column(s) chosen are the optimal data distribution key to minimize skew.
CREATE TABLE
......@@ -28,7 +28,6 @@ CREATE TABLE
col013 | bigint | | plain |
col014 | character(8) | | extended |
col015 | bytea | | extended |
col016 | timestamp with time zone | | plain |
col017 | interval | | plain |
col018 | cidr | | main |
col019 | inet | | main |
......@@ -50,23 +49,23 @@ CREATE TABLE
Compression Type: None
Compression Level: 0
Block Size: 32768
Checksum: f
Checksum: t
Has OIDs: no
Options: appendonly=true
Distributed by: (a)
INSERT INTO ao_table VALUES (1,'a',11,true,'111', '1_one', '{1,2,3,4,5}', 'Hello .. how are you 1', 'Hello .. how are you 1', '{one,two,three,four,five}', 12345678, 1, 111.1111, 11, '1_one_11', 'd', '2001-12-13 01:51:15+1359', '11', '0.0.0.0', '0.0.0.0', 'AA:AA:AA:AA:AA:AA', '34.23', '((2,2),1)', '((1,2),(2,1))', 'hello', '((1,2),(2,1))', 11, '010101', '2001-12-13', '((1,1),(2,2))', '(1,1)', '((1,2),(2,3),(3,4),(4,3),(3,2),(2,1))', 111111, '23:00:00', '2001-12-13 01:51:15');
INSERT INTO ao_table VALUES (1,'a',11,true,'111', '1_one', '{1,2,3,4,5}', 'Hello .. how are you 1', 'Hello .. how are you 1', '{one,two,three,four,five}', 12345678, 1, 111.1111, 11, '1_one_11', 'd', '11', '0.0.0.0', '0.0.0.0', 'AA:AA:AA:AA:AA:AA', '34.23', '((2,2),1)', '((1,2),(2,1))', 'hello', '((1,2),(2,1))', 11, '010101', '2001-12-13', '((1,1),(2,2))', '(1,1)', '((1,2),(2,3),(3,4),(4,3),(3,2),(2,1))', 111111, '23:00:00', '2001-12-13 01:51:15');
INSERT 0 1
INSERT INTO ao_table VALUES ( 2, 'b', 22, false, '001', '2_one', '{6,7,8,9,10}', 'Hey.. whtz up 2', 'Hey .. whtz up 2', '{one,two,three,four,five}', 76767669, 1, 222.2222, 11, '2_two_22', 'c', '2002-12-13 01:51:15+1359', '22', '0.0.0.0', '0.0.0.0', 'BB:BB:BB:BB:BB:BB', '200.00', '((3,3),2)', '((3,2),(2,3))', 'hello', '((3,2),(2,3))', 22, '01010100101', '2002-12-13', '((2,2),(3,3))', '(2,2)', '((1,2),(2,3),(3,4),(4,3),(3,2),(2,1))', 11111, '22:00:00', '2002-12-13 01:51:15');
INSERT INTO ao_table VALUES ( 2, 'b', 22, false, '001', '2_one', '{6,7,8,9,10}', 'Hey.. whtz up 2', 'Hey .. whtz up 2', '{one,two,three,four,five}', 76767669, 1, 222.2222, 11, '2_two_22', 'c', '22', '0.0.0.0', '0.0.0.0', 'BB:BB:BB:BB:BB:BB', '200.00', '((3,3),2)', '((3,2),(2,3))', 'hello', '((3,2),(2,3))', 22, '01010100101', '2002-12-13', '((2,2),(3,3))', '(2,2)', '((1,2),(2,3),(3,4),(4,3),(3,2),(2,1))', 11111, '22:00:00', '2002-12-13 01:51:15');
INSERT 0 1
select * from ao_table order by a; -- order 1
a | col001 | col002 | col003 | col004 | col005 | col006 | col007 | col008 | col009 | col010 | col011 | col012 | col013 | col014 | col015 | col016 | col017 | col018 | col019 | col020 | col022 | col025 | col026 | col027 | col028 | col029 | col031 | col032 | col034 | col035 | col036 | col037 | col039 | col040
---+--------+--------+--------+--------+--------+--------------+------------------------+------------------------+---------------------------+----------+--------+----------+--------+----------+--------+------------------------+----------+------------+---------+-------------------+---------+-----------+-------------+--------+---------------+--------+-------------+------------+---------------+--------+---------------------------------------+--------+----------+---------------------
1 | a | 11 | t | 111 | 1_one | {1,2,3,4,5} | Hello .. how are you 1 | Hello .. how are you 1 | {one,two,three,four,five} | 12345678 | 1 | 111.1111 | 11 | 1_one_11 | d | 2001-12-12 03:52:15-08 | 00:00:11 | 0.0.0.0/32 | 0.0.0.0 | aa:aa:aa:aa:aa:aa | $34.23 | <(2,2),1> | (2,2),(1,1) | hello | ((1,2),(2,1)) | 11 | 010101 | 2001-12-13 | [(1,1),(2,2)] | (1,1) | ((1,2),(2,3),(3,4),(4,3),(3,2),(2,1)) | 111111 | 23:00:00 | 2001-12-13 01:51:15
2 | b | 22 | f | 001 | 2_one | {6,7,8,9,10} | Hey.. whtz up 2 | Hey .. whtz up 2 | {one,two,three,four,five} | 76767669 | 1 | 222.2222 | 11 | 2_two_22 | c | 2002-12-12 03:52:15-08 | 00:00:22 | 0.0.0.0/32 | 0.0.0.0 | bb:bb:bb:bb:bb:bb | $200.00 | <(3,3),2> | (3,3),(2,2) | hello | ((3,2),(2,3)) | 22 | 01010100101 | 2002-12-13 | [(2,2),(3,3)] | (2,2) | ((1,2),(2,3),(3,4),(4,3),(3,2),(2,1)) | 11111 | 22:00:00 | 2002-12-13 01:51:15
a | col001 | col002 | col003 | col004 | col005 | col006 | col007 | col008 | col009 | col010 | col011 | col012 | col013 | col014 | col015 | col017 | col018 | col019 | col020 | col022 | col025 | col026 | col027 | col028 | col029 | col031 | col032 | col034 | col035 | col036 | col037 | col039 | col040
---+--------+--------+--------+--------+--------+--------------+------------------------+------------------------+---------------------------+----------+--------+----------+--------+----------+--------+----------+------------+---------+-------------------+---------+-----------+-------------+--------+---------------+--------+-------------+------------+---------------+--------+---------------------------------------+--------+----------+---------------------
1 | a | 11 | t | 111 | 1_one | {1,2,3,4,5} | Hello .. how are you 1 | Hello .. how are you 1 | {one,two,three,four,five} | 12345678 | 1 | 111.1111 | 11 | 1_one_11 | d | 00:00:11 | 0.0.0.0/32 | 0.0.0.0 | aa:aa:aa:aa:aa:aa | $34.23 | <(2,2),1> | (2,2),(1,1) | hello | ((1,2),(2,1)) | 11 | 010101 | 2001-12-13 | [(1,1),(2,2)] | (1,1) | ((1,2),(2,3),(3,4),(4,3),(3,2),(2,1)) | 111111 | 23:00:00 | 2001-12-13 01:51:15
2 | b | 22 | f | 001 | 2_one | {6,7,8,9,10} | Hey.. whtz up 2 | Hey .. whtz up 2 | {one,two,three,four,five} | 76767669 | 1 | 222.2222 | 11 | 2_two_22 | c | 00:00:22 | 0.0.0.0/32 | 0.0.0.0 | bb:bb:bb:bb:bb:bb | $200.00 | <(3,3),2> | (3,3),(2,2) | hello | ((3,2),(2,3)) | 22 | 01010100101 | 2002-12-13 | [(2,2),(3,3)] | (2,2) | ((1,2),(2,3),(3,4),(4,3),(3,2),(2,1)) | 11111 | 22:00:00 | 2002-12-13 01:51:15
(2 rows)
CREATE TABLE new_ao_table ( a int,col001 char DEFAULT 'z',col002 numeric,col003 boolean DEFAULT false,col004 bit(3) DEFAULT '111',col005 text DEFAULT 'pookie', col006 integer[] DEFAULT '{5, 4, 3, 2, 1}', col007 character varying(512) DEFAULT 'Now is the time', col008 character varying DEFAULT 'Now is the time', col009 character varying(512)[], col010 numeric(8),col011 int,col012 double precision, col013 bigint, col014 char(8), col015 bytea,col016 timestamp with time zone,col017 interval, col018 cidr, col019 inet, col020 macaddr,col022 money, col025 circle, col026 box, col027 name,col028 path, col029 int2, col031 bit varying(256),col032 date, col034 lseg,col035 point,col036 polygon,col037 real,col039 time, col040 timestamp )with (appendonly=true);
CREATE TABLE new_ao_table ( a int,col001 char DEFAULT 'z',col002 numeric,col003 boolean DEFAULT false,col004 bit(3) DEFAULT '111',col005 text DEFAULT 'pookie', col006 integer[] DEFAULT '{5, 4, 3, 2, 1}', col007 character varying(512) DEFAULT 'Now is the time', col008 character varying DEFAULT 'Now is the time', col009 character varying(512)[], col010 numeric(8),col011 int,col012 double precision, col013 bigint, col014 char(8), col015 bytea,col017 interval, col018 cidr, col019 inet, col020 macaddr,col022 money, col025 circle, col026 box, col027 name,col028 path, col029 int2, col031 bit varying(256),col032 date, col034 lseg,col035 point,col036 polygon,col037 real,col039 time, col040 timestamp )with (appendonly=true);
psql:/path/sql_file:1: NOTICE: Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'a' as the Greenplum Database data distribution key for this table.
HINT: The 'DISTRIBUTED BY' clause determines the distribution of data. Make sure column(s) chosen are the optimal data distribution key to minimize skew.
CREATE TABLE
......@@ -90,7 +89,6 @@ CREATE TABLE
col013 | bigint | | plain |
col014 | character(8) | | extended |
col015 | bytea | | extended |
col016 | timestamp with time zone | | plain |
col017 | interval | | plain |
col018 | cidr | | main |
col019 | inet | | main |
......@@ -112,21 +110,21 @@ CREATE TABLE
Compression Type: None
Compression Level: 0
Block Size: 32768
Checksum: f
Checksum: t
Has OIDs: no
Options: appendonly=true
Distributed by: (a)
INSERT INTO new_ao_table VALUES (generate_series(500,505),'a',generate_series(500,505),true,'111', '1_one', '{1,2,3,4,5}', 'Hello .. how are you 1', 'Hello .. how are you 1', '{one,two,three,four,five}', generate_series(500,505), generate_series(500,505), 111.1111, generate_series(500,505), '1_one_11', 'd', '2001-12-13 01:51:15+1359', '11', '0.0.0.0', '0.0.0.0', 'AA:AA:AA:AA:AA:AA', '34.23', '((2,2),1)', '((1,2),(2,1))', 'hello', '((1,2),(2,1))', 11, '010101', '2001-12-13', '((1,1),(2,2))', '(1,1)', '((1,2),(2,3),(3,4),(4,3),(3,2),(2,1))', 111111, '23:00:00', '2001-12-13 01:51:15');
INSERT INTO new_ao_table VALUES (generate_series(500,505),'a',generate_series(500,505),true,'111', '1_one', '{1,2,3,4,5}', 'Hello .. how are you 1', 'Hello .. how are you 1', '{one,two,three,four,five}', generate_series(500,505), generate_series(500,505), 111.1111, generate_series(500,505), '1_one_11', 'd', '11', '0.0.0.0', '0.0.0.0', 'AA:AA:AA:AA:AA:AA', '34.23', '((2,2),1)', '((1,2),(2,1))', 'hello', '((1,2),(2,1))', 11, '010101', '2001-12-13', '((1,1),(2,2))', '(1,1)', '((1,2),(2,3),(3,4),(4,3),(3,2),(2,1))', 111111, '23:00:00', '2001-12-13 01:51:15');
INSERT 0 6
select * from new_ao_table order by a; -- order 1
a | col001 | col002 | col003 | col004 | col005 | col006 | col007 | col008 | col009 | col010 | col011 | col012 | col013 | col014 | col015 | col016 | col017 | col018 | col019 | col020 | col022 | col025 | col026 | col027 | col028 | col029 | col031 | col032 | col034 | col035 | col036 | col037 | col039 | col040
-----+--------+--------+--------+--------+--------+-------------+------------------------+------------------------+---------------------------+--------+--------+----------+--------+----------+--------+------------------------+----------+------------+---------+-------------------+--------+-----------+-------------+--------+---------------+--------+--------+------------+---------------+--------+---------------------------------------+--------+----------+---------------------
500 | a | 500 | t | 111 | 1_one | {1,2,3,4,5} | Hello .. how are you 1 | Hello .. how are you 1 | {one,two,three,four,five} | 500 | 500 | 111.1111 | 500 | 1_one_11 | d | 2001-12-12 03:52:15-08 | 00:00:11 | 0.0.0.0/32 | 0.0.0.0 | aa:aa:aa:aa:aa:aa | $34.23 | <(2,2),1> | (2,2),(1,1) | hello | ((1,2),(2,1)) | 11 | 010101 | 2001-12-13 | [(1,1),(2,2)] | (1,1) | ((1,2),(2,3),(3,4),(4,3),(3,2),(2,1)) | 111111 | 23:00:00 | 2001-12-13 01:51:15
501 | a | 501 | t | 111 | 1_one | {1,2,3,4,5} | Hello .. how are you 1 | Hello .. how are you 1 | {one,two,three,four,five} | 501 | 501 | 111.1111 | 501 | 1_one_11 | d | 2001-12-12 03:52:15-08 | 00:00:11 | 0.0.0.0/32 | 0.0.0.0 | aa:aa:aa:aa:aa:aa | $34.23 | <(2,2),1> | (2,2),(1,1) | hello | ((1,2),(2,1)) | 11 | 010101 | 2001-12-13 | [(1,1),(2,2)] | (1,1) | ((1,2),(2,3),(3,4),(4,3),(3,2),(2,1)) | 111111 | 23:00:00 | 2001-12-13 01:51:15
502 | a | 502 | t | 111 | 1_one | {1,2,3,4,5} | Hello .. how are you 1 | Hello .. how are you 1 | {one,two,three,four,five} | 502 | 502 | 111.1111 | 502 | 1_one_11 | d | 2001-12-12 03:52:15-08 | 00:00:11 | 0.0.0.0/32 | 0.0.0.0 | aa:aa:aa:aa:aa:aa | $34.23 | <(2,2),1> | (2,2),(1,1) | hello | ((1,2),(2,1)) | 11 | 010101 | 2001-12-13 | [(1,1),(2,2)] | (1,1) | ((1,2),(2,3),(3,4),(4,3),(3,2),(2,1)) | 111111 | 23:00:00 | 2001-12-13 01:51:15
503 | a | 503 | t | 111 | 1_one | {1,2,3,4,5} | Hello .. how are you 1 | Hello .. how are you 1 | {one,two,three,four,five} | 503 | 503 | 111.1111 | 503 | 1_one_11 | d | 2001-12-12 03:52:15-08 | 00:00:11 | 0.0.0.0/32 | 0.0.0.0 | aa:aa:aa:aa:aa:aa | $34.23 | <(2,2),1> | (2,2),(1,1) | hello | ((1,2),(2,1)) | 11 | 010101 | 2001-12-13 | [(1,1),(2,2)] | (1,1) | ((1,2),(2,3),(3,4),(4,3),(3,2),(2,1)) | 111111 | 23:00:00 | 2001-12-13 01:51:15
504 | a | 504 | t | 111 | 1_one | {1,2,3,4,5} | Hello .. how are you 1 | Hello .. how are you 1 | {one,two,three,four,five} | 504 | 504 | 111.1111 | 504 | 1_one_11 | d | 2001-12-12 03:52:15-08 | 00:00:11 | 0.0.0.0/32 | 0.0.0.0 | aa:aa:aa:aa:aa:aa | $34.23 | <(2,2),1> | (2,2),(1,1) | hello | ((1,2),(2,1)) | 11 | 010101 | 2001-12-13 | [(1,1),(2,2)] | (1,1) | ((1,2),(2,3),(3,4),(4,3),(3,2),(2,1)) | 111111 | 23:00:00 | 2001-12-13 01:51:15
505 | a | 505 | t | 111 | 1_one | {1,2,3,4,5} | Hello .. how are you 1 | Hello .. how are you 1 | {one,two,three,four,five} | 505 | 505 | 111.1111 | 505 | 1_one_11 | d | 2001-12-12 03:52:15-08 | 00:00:11 | 0.0.0.0/32 | 0.0.0.0 | aa:aa:aa:aa:aa:aa | $34.23 | <(2,2),1> | (2,2),(1,1) | hello | ((1,2),(2,1)) | 11 | 010101 | 2001-12-13 | [(1,1),(2,2)] | (1,1) | ((1,2),(2,3),(3,4),(4,3),(3,2),(2,1)) | 111111 | 23:00:00 | 2001-12-13 01:51:15
a | col001 | col002 | col003 | col004 | col005 | col006 | col007 | col008 | col009 | col010 | col011 | col012 | col013 | col014 | col015 | col017 | col018 | col019 | col020 | col022 | col025 | col026 | col027 | col028 | col029 | col031 | col032 | col034 | col035 | col036 | col037 | col039 | col040
-----+--------+--------+--------+--------+--------+-------------+------------------------+------------------------+---------------------------+--------+--------+----------+--------+----------+--------+----------+------------+---------+-------------------+--------+-----------+-------------+--------+---------------+--------+--------+------------+---------------+--------+---------------------------------------+--------+----------+---------------------
500 | a | 500 | t | 111 | 1_one | {1,2,3,4,5} | Hello .. how are you 1 | Hello .. how are you 1 | {one,two,three,four,five} | 500 | 500 | 111.1111 | 500 | 1_one_11 | d | 00:00:11 | 0.0.0.0/32 | 0.0.0.0 | aa:aa:aa:aa:aa:aa | $34.23 | <(2,2),1> | (2,2),(1,1) | hello | ((1,2),(2,1)) | 11 | 010101 | 2001-12-13 | [(1,1),(2,2)] | (1,1) | ((1,2),(2,3),(3,4),(4,3),(3,2),(2,1)) | 111111 | 23:00:00 | 2001-12-13 01:51:15
501 | a | 501 | t | 111 | 1_one | {1,2,3,4,5} | Hello .. how are you 1 | Hello .. how are you 1 | {one,two,three,four,five} | 501 | 501 | 111.1111 | 501 | 1_one_11 | d | 00:00:11 | 0.0.0.0/32 | 0.0.0.0 | aa:aa:aa:aa:aa:aa | $34.23 | <(2,2),1> | (2,2),(1,1) | hello | ((1,2),(2,1)) | 11 | 010101 | 2001-12-13 | [(1,1),(2,2)] | (1,1) | ((1,2),(2,3),(3,4),(4,3),(3,2),(2,1)) | 111111 | 23:00:00 | 2001-12-13 01:51:15
502 | a | 502 | t | 111 | 1_one | {1,2,3,4,5} | Hello .. how are you 1 | Hello .. how are you 1 | {one,two,three,four,five} | 502 | 502 | 111.1111 | 502 | 1_one_11 | d | 00:00:11 | 0.0.0.0/32 | 0.0.0.0 | aa:aa:aa:aa:aa:aa | $34.23 | <(2,2),1> | (2,2),(1,1) | hello | ((1,2),(2,1)) | 11 | 010101 | 2001-12-13 | [(1,1),(2,2)] | (1,1) | ((1,2),(2,3),(3,4),(4,3),(3,2),(2,1)) | 111111 | 23:00:00 | 2001-12-13 01:51:15
503 | a | 503 | t | 111 | 1_one | {1,2,3,4,5} | Hello .. how are you 1 | Hello .. how are you 1 | {one,two,three,four,five} | 503 | 503 | 111.1111 | 503 | 1_one_11 | d | 00:00:11 | 0.0.0.0/32 | 0.0.0.0 | aa:aa:aa:aa:aa:aa | $34.23 | <(2,2),1> | (2,2),(1,1) | hello | ((1,2),(2,1)) | 11 | 010101 | 2001-12-13 | [(1,1),(2,2)] | (1,1) | ((1,2),(2,3),(3,4),(4,3),(3,2),(2,1)) | 111111 | 23:00:00 | 2001-12-13 01:51:15
504 | a | 504 | t | 111 | 1_one | {1,2,3,4,5} | Hello .. how are you 1 | Hello .. how are you 1 | {one,two,three,four,five} | 504 | 504 | 111.1111 | 504 | 1_one_11 | d | 00:00:11 | 0.0.0.0/32 | 0.0.0.0 | aa:aa:aa:aa:aa:aa | $34.23 | <(2,2),1> | (2,2),(1,1) | hello | ((1,2),(2,1)) | 11 | 010101 | 2001-12-13 | [(1,1),(2,2)] | (1,1) | ((1,2),(2,3),(3,4),(4,3),(3,2),(2,1)) | 111111 | 23:00:00 | 2001-12-13 01:51:15
505 | a | 505 | t | 111 | 1_one | {1,2,3,4,5} | Hello .. how are you 1 | Hello .. how are you 1 | {one,two,three,four,five} | 505 | 505 | 111.1111 | 505 | 1_one_11 | d | 00:00:11 | 0.0.0.0/32 | 0.0.0.0 | aa:aa:aa:aa:aa:aa | $34.23 | <(2,2),1> | (2,2),(1,1) | hello | ((1,2),(2,1)) | 11 | 010101 | 2001-12-13 | [(1,1),(2,2)] | (1,1) | ((1,2),(2,3),(3,4),(4,3),(3,2),(2,1)) | 111111 | 23:00:00 | 2001-12-13 01:51:15
(6 rows)
......@@ -6,8 +6,7 @@ DROP TABLE IF EXISTS new_busted;
psql:/path/sql_file:1: NOTICE: table "new_busted" does not exist, skipping
DROP TABLE
-- end_ignore
CREATE TABLE busted ( a int,col001 char DEFAULT 'z',col002 numeric,col003 boolean DEFAULT false,col004 bit(3) DEFAULT '111',col005 text DEFAULT 'pookie', col006 integer[] DEFAULT '{5, 4, 3, 2, 1}', col007 character varying(512) DEFAULT 'Now is the time', col008 character varying DEFAULT 'Now is the time', col009 character varying(512)[], col010 numeric(8),col011 int,col012 double precision, col013 bigint, col014 char(8), col015 bytea,col016 timestamp with time zone,col017 interval, col018 cidr, col019 inet, col020 macaddr,col022 money, col024 timetz,col025 circle, col026 box, col027 name,col028 path, col029 int2, col031 bit varying(256),col032 date, col034 lseg,col035 point,col036 polygon,col037 real,col039 time, col040 timestamp )with (orientation='column',appendonly=true);
CREATE TABLE busted ( a int,col001 char DEFAULT 'z',col002 numeric,col003 boolean DEFAULT false,col004 bit(3) DEFAULT '111',col005 text DEFAULT 'pookie', col006 integer[] DEFAULT '{5, 4, 3, 2, 1}', col007 character varying(512) DEFAULT 'Now is the time', col008 character varying DEFAULT 'Now is the time', col009 character varying(512)[], col010 numeric(8),col011 int,col012 double precision, col013 bigint, col014 char(8), col015 bytea,col017 interval, col018 cidr, col019 inet, col020 macaddr,col022 money, col024 timetz,col025 circle, col026 box, col027 name,col028 path, col029 int2, col031 bit varying(256),col032 date, col034 lseg,col035 point,col036 polygon,col037 real,col039 time, col040 timestamp )with (orientation='column',appendonly=true);
psql:/path/sql_file:1: NOTICE: Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'a' as the Greenplum Database data distribution key for this table.
HINT: The 'DISTRIBUTED BY' clause determines the distribution of data. Make sure column(s) chosen are the optimal data distribution key to minimize skew.
CREATE TABLE
......@@ -31,7 +30,6 @@ CREATE TABLE
col013 | bigint | | plain | none | 0 | 32768 |
col014 | character(8) | | extended | none | 0 | 32768 |
col015 | bytea | | extended | none | 0 | 32768 |
col016 | timestamp with time zone | | plain | none | 0 | 32768 |
col017 | interval | | plain | none | 0 | 32768 |
col018 | cidr | | main | none | 0 | 32768 |
col019 | inet | | main | none | 0 | 32768 |
......@@ -51,14 +49,14 @@ CREATE TABLE
col037 | real | | plain | none | 0 | 32768 |
col039 | time without time zone | | plain | none | 0 | 32768 |
col040 | timestamp without time zone | | plain | none | 0 | 32768 |
Checksum: f
Checksum: t
Has OIDs: no
Options: orientation=column, appendonly=true
Distributed by: (a)
INSERT INTO busted VALUES (1,'a',11,true,'111', '1_one', '{1,2,3,4,5}', 'Hello .. how are you 1', 'Hello .. how are you 1', '{one,two,three,four,five}', 12345678, 1, 111.1111, 11, '1_one_11', 'd', '2001-12-13 01:51:15+1359', '11', '0.0.0.0', '0.0.0.0', 'AA:AA:AA:AA:AA:AA', '34.23', '00:00:00+1359', '((2,2),1)', '((1,2),(2,1))', 'hello', '((1,2),(2,1))', 11, '010101', '2001-12-13', '((1,1),(2,2))', '(1,1)', '((1,2),(2,3),(3,4),(4,3),(3,2),(2,1))', 111111, '23:00:00', '2001-12-13 01:51:15');
INSERT INTO busted VALUES (1,'a',11,true,'111', '1_one', '{1,2,3,4,5}', 'Hello .. how are you 1', 'Hello .. how are you 1', '{one,two,three,four,five}', 12345678, 1, 111.1111, 11, '1_one_11', 'd', '11', '0.0.0.0', '0.0.0.0', 'AA:AA:AA:AA:AA:AA', '34.23', '00:00:00+1359', '((2,2),1)', '((1,2),(2,1))', 'hello', '((1,2),(2,1))', 11, '010101', '2001-12-13', '((1,1),(2,2))', '(1,1)', '((1,2),(2,3),(3,4),(4,3),(3,2),(2,1))', 111111, '23:00:00', '2001-12-13 01:51:15');
INSERT 0 1
INSERT INTO busted VALUES ( 2, 'b', 22, false, '001', '2_one', '{6,7,8,9,10}', 'Hey.. whtz up 2', 'Hey .. whtz up 2', '{one,two,three,four,five}', 76767669, 1, 222.2222, 11, '2_two_22', 'c', '2002-12-13 01:51:15+1359', '22', '0.0.0.0', '0.0.0.0', 'BB:BB:BB:BB:BB:BB', '200.00', '00:00:05', '((3,3),2)', '((3,2),(2,3))', 'hello', '((3,2),(2,3))', 22, '01010100101', '2002-12-13', '((2,2),(3,3))', '(2,2)', '((1,2),(2,3),(3,4),(4,3),(3,2),(2,1))', 11111, '22:00:00', '2002-12-13 01:51:15');
INSERT INTO busted VALUES ( 2, 'b', 22, false, '001', '2_one', '{6,7,8,9,10}', 'Hey.. whtz up 2', 'Hey .. whtz up 2', '{one,two,three,four,five}', 76767669, 1, 222.2222, 11, '2_two_22', 'c', '22', '0.0.0.0', '0.0.0.0', 'BB:BB:BB:BB:BB:BB', '200.00', '00:00:05', '((3,3),2)', '((3,2),(2,3))', 'hello', '((3,2),(2,3))', 22, '01010100101', '2002-12-13', '((2,2),(3,3))', '(2,2)', '((1,2),(2,3),(3,4),(4,3),(3,2),(2,1))', 11111, '22:00:00', '2002-12-13 01:51:15');
INSERT 0 1
select count(*) from busted ;
count
......@@ -66,7 +64,7 @@ select count(*) from busted ;
2
(1 row)
CREATE TABLE new_busted ( a int,col001 char DEFAULT 'z',col002 numeric,col003 boolean DEFAULT false,col004 bit(3) DEFAULT '111',col005 text DEFAULT 'pookie', col006 integer[] DEFAULT '{5, 4, 3, 2, 1}', col007 character varying(512) DEFAULT 'Now is the time', col008 character varying DEFAULT 'Now is the time', col009 character varying(512)[], col010 numeric(8),col011 int,col012 double precision, col013 bigint, col014 char(8), col015 bytea,col016 timestamp with time zone,col017 interval, col018 cidr, col019 inet, col020 macaddr,col022 money, col024 timetz,col025 circle, col026 box, col027 name,col028 path, col029 int2, col031 bit varying(256),col032 date, col034 lseg,col035 point,col036 polygon,col037 real,col039 time, col040 timestamp )with (orientation='column',appendonly=true);
CREATE TABLE new_busted ( a int,col001 char DEFAULT 'z',col002 numeric,col003 boolean DEFAULT false,col004 bit(3) DEFAULT '111',col005 text DEFAULT 'pookie', col006 integer[] DEFAULT '{5, 4, 3, 2, 1}', col007 character varying(512) DEFAULT 'Now is the time', col008 character varying DEFAULT 'Now is the time', col009 character varying(512)[], col010 numeric(8),col011 int,col012 double precision, col013 bigint, col014 char(8), col015 bytea,col017 interval, col018 cidr, col019 inet, col020 macaddr,col022 money, col024 timetz,col025 circle, col026 box, col027 name,col028 path, col029 int2, col031 bit varying(256),col032 date, col034 lseg,col035 point,col036 polygon,col037 real,col039 time, col040 timestamp )with (orientation='column',appendonly=true);
psql:/path/sql_file:1: NOTICE: Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'a' as the Greenplum Database data distribution key for this table.
HINT: The 'DISTRIBUTED BY' clause determines the distribution of data. Make sure column(s) chosen are the optimal data distribution key to minimize skew.
CREATE TABLE
......@@ -90,7 +88,6 @@ CREATE TABLE
col013 | bigint | | plain | none | 0 | 32768 |
col014 | character(8) | | extended | none | 0 | 32768 |
col015 | bytea | | extended | none | 0 | 32768 |
col016 | timestamp with time zone | | plain | none | 0 | 32768 |
col017 | interval | | plain | none | 0 | 32768 |
col018 | cidr | | main | none | 0 | 32768 |
col019 | inet | | main | none | 0 | 32768 |
......@@ -110,15 +107,16 @@ CREATE TABLE
col037 | real | | plain | none | 0 | 32768 |
col039 | time without time zone | | plain | none | 0 | 32768 |
col040 | timestamp without time zone | | plain | none | 0 | 32768 |
Checksum: f
Checksum: t
Has OIDs: no
Options: orientation=column, appendonly=true
Distributed by: (a)
INSERT INTO new_busted VALUES (generate_series(5,100),'a',generate_series(5,100),true,'111', '1_one', '{1,2,3,4,5}', 'Hello .. how are you 1', 'Hello .. how are you 1', '{one,two,three,four,five}', generate_series(5,100), generate_series(5,100), 111.1111, generate_series(5,100), '1_one_11', 'd', '2001-12-13 01:51:15+1359', '11', '0.0.0.0', '0.0.0.0', 'AA:AA:AA:AA:AA:AA', '34.23', '00:00:00+1359', '((2,2),1)', '((1,2),(2,1))', 'hello', '((1,2),(2,1))', 11, '010101', '2001-12-13', '((1,1),(2,2))', '(1,1)', '((1,2),(2,3),(3,4),(4,3),(3,2),(2,1))', 111111, '23:00:00', '2001-12-13 01:51:15');
INSERT INTO new_busted VALUES (generate_series(5,100),'a',generate_series(5,100),true,'111', '1_one', '{1,2,3,4,5}', 'Hello .. how are you 1', 'Hello .. how are you 1', '{one,two,three,four,five}', generate_series(5,100), generate_series(5,100), 111.1111, generate_series(5,100), '1_one_11', 'd', '11', '0.0.0.0', '0.0.0.0', 'AA:AA:AA:AA:AA:AA', '34.23', '00:00:00+1359', '((2,2),1)', '((1,2),(2,1))', 'hello', '((1,2),(2,1))', 11, '010101', '2001-12-13', '((1,1),(2,2))', '(1,1)', '((1,2),(2,3),(3,4),(4,3),(3,2),(2,1))', 111111, '23:00:00', '2001-12-13 01:51:15');
INSERT 0 96
select count(*) from new_busted ;
count
-------
96
(1 row)
......@@ -5,15 +5,15 @@ SET gp_create_table_random_default_distribution=off;
DROP TABLE IF EXISTS heap_tbl;
-- end_ignore
CREATE TABLE heap_tbl
(id SERIAL,a1 int,a2 char(5),a3 numeric,a4 boolean DEFAULT false ,a5 char DEFAULT 'd',a6 text,a7 timestamp,a8 character varying(705),a9 bigint,a10 date,a11 varchar(600),a12 text,a13 decimal,a14 real,a15 bigint,a16 int4 ,a17 bytea,a18 timestamp with time zone,a19 timetz,a20 path,a21 box,a22 macaddr,a23 interval,a24 character varying(800),a25 lseg,a26 point,a27 double precision,a28 circle,a29 int4,a30 numeric(8),a31 polygon,a32 date,a33 real,a34 money,a35 cidr,a36 inet,
(id SERIAL,a1 int,a2 char(5),a3 numeric,a4 boolean DEFAULT false ,a5 char DEFAULT 'd',a6 text,a7 timestamp,a8 character varying(705),a9 bigint,a10 date,a11 varchar(600),a12 text,a13 decimal,a14 real,a15 bigint,a16 int4 ,a17 bytea,a20 path,a21 box,a22 macaddr,a23 interval,a24 character varying(800),a25 lseg,a26 point,a27 double precision,a28 circle,a29 int4,a30 numeric(8),a31 polygon,a32 date,a33 real,a34 money,a35 cidr,a36 inet,
a37 time,a38 text,a39 bit,a40 bit varying(5),a41 smallint,a42 int ) WITH (appendonly=false) distributed randomly;
--Insert data to the table
INSERT INTO heap_tbl(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,a16,a17,a18,a19,a20,a21,a22,a23,a24,a25,a26,a27,a28,a29,a30,a31,a32,a33,a34,a35,a36,a37,a38,a39,a40,a41,a42) values(generate_series(1,20),'M',2011,'t','a','This is news of today: Deadlock between Republicans and Democrats over how best to reduce the U.S. deficit, and over what period, has blocked an agreement to allow the raising of the $14.3 trillion debt ceiling','2001-12-24 02:26:11','U.S. House of Representatives Speaker John Boehner, the top Republican in Congress who has put forward a deficit reduction plan to be voted on later on Thursday said he had no control over whether his bill would avert a credit downgrade.',generate_series(2490,2505),'2011-10-11','The Republican-controlled House is tentatively scheduled to vote on Boehner proposal this afternoon at around 6 p.m. EDT (2200 GMT). The main Republican vote counter in the House, Kevin McCarthy, would not say if there were enough votes to pass the bill.','WASHINGTON:House Speaker John Boehner says his plan mixing spending cuts in exchange for raising the nations $14.3 trillion debt limit is not perfect but is as large a step that a divided government can take that is doable and signable by President Barack Obama.The Ohio Republican says the measure is an honest and sincere attempt at compromise and was negotiated with Democrats last weekend and that passing it would end the ongoing debt crisis. The plan blends $900 billion-plus in spending cuts with a companion increase in the nations borrowing cap.','1234.56',323453,generate_series(3452,3462),7845,'0011','2005-07-16 01:51:15+1359','2001-12-13 01:51:15','((1,2),(0,3),(2,1))','((2,3)(4,5))','08:00:2b:01:02:03','1-2','Republicans had been working throughout the day Thursday to lock down support for their plan to raise the nations debt ceiling, even as Senate Democrats vowed to swiftly kill it if passed.','((2,3)(4,5))','(6,7)',11.222,'((4,5),7)',32,3214,'(1,0,2,3)','2010-02-21',43564,'$1,000.00','192.168.1','126.1.3.4','12:30:45','Johnson & Johnsons McNeil Consumer Healthcare announced the voluntary dosage reduction today. Labels will carry new dosing instructions this fall.The company says it will cut the maximum dosage of Regular Strength Tylenol and other acetaminophen-containing products in 2012.Acetaminophen is safe when used as directed, says Edwin Kuffner, MD, McNeil vice president of over-the-counter medical affairs. But, when too much is taken, it can cause liver damage.The action is intended to cut the risk of such accidental overdoses, the company says in a news release.','1','0',12,23);
INSERT INTO heap_tbl(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,a16,a17,a20,a21,a22,a23,a24,a25,a26,a27,a28,a29,a30,a31,a32,a33,a34,a35,a36,a37,a38,a39,a40,a41,a42) values(generate_series(1,20),'M',2011,'t','a','This is news of today: Deadlock between Republicans and Democrats over how best to reduce the U.S. deficit, and over what period, has blocked an agreement to allow the raising of the $14.3 trillion debt ceiling','2001-12-24 02:26:11','U.S. House of Representatives Speaker John Boehner, the top Republican in Congress who has put forward a deficit reduction plan to be voted on later on Thursday said he had no control over whether his bill would avert a credit downgrade.',generate_series(2490,2505),'2011-10-11','The Republican-controlled House is tentatively scheduled to vote on Boehner proposal this afternoon at around 6 p.m. EDT (2200 GMT). The main Republican vote counter in the House, Kevin McCarthy, would not say if there were enough votes to pass the bill.','WASHINGTON:House Speaker John Boehner says his plan mixing spending cuts in exchange for raising the nations $14.3 trillion debt limit is not perfect but is as large a step that a divided government can take that is doable and signable by President Barack Obama.The Ohio Republican says the measure is an honest and sincere attempt at compromise and was negotiated with Democrats last weekend and that passing it would end the ongoing debt crisis. The plan blends $900 billion-plus in spending cuts with a companion increase in the nations borrowing cap.','1234.56',323453,generate_series(3452,3462),7845,'0011','((1,2),(0,3),(2,1))','((2,3)(4,5))','08:00:2b:01:02:03','1-2','Republicans had been working throughout the day Thursday to lock down support for their plan to raise the nations debt ceiling, even as Senate Democrats vowed to swiftly kill it if passed.','((2,3)(4,5))','(6,7)',11.222,'((4,5),7)',32,3214,'(1,0,2,3)','2010-02-21',43564,'$1,000.00','192.168.1','126.1.3.4','12:30:45','Johnson & Johnsons McNeil Consumer Healthcare announced the voluntary dosage reduction today. Labels will carry new dosing instructions this fall.The company says it will cut the maximum dosage of Regular Strength Tylenol and other acetaminophen-containing products in 2012.Acetaminophen is safe when used as directed, says Edwin Kuffner, MD, McNeil vice president of over-the-counter medical affairs. But, when too much is taken, it can cause liver damage.The action is intended to cut the risk of such accidental overdoses, the company says in a news release.','1','0',12,23);
INSERT INTO heap_tbl(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,a16,a17,a18,a19,a20,a21,a22,a23,a24,a25,a26,a27,a28,a29,a30,a31,a32,a33,a34,a35,a36,a37,a38,a39,a40,a41,a42) values(generate_series(500,510),'F',2010,'f','b','Some students may need time to adjust to school.For most children, the adjustment is quick. Tears will usually disappear after Mommy and Daddy leave the classroom. Do not plead with your child','2001-12-25 02:22:11','Some students may need time to adjust to school.For most children, the adjustment is quick. Tears will usually disappear after Mommy and Daddy leave the classroom. Do not plead with your child',generate_series(2500,2516),'2011-10-12','Some students may need time to adjust to school.For most children, the adjustment is quick. Tears will usually disappear after Mommy and Daddy leave the classroom. Do not plead with your child','Some students may need time to adjust to school.For most children, the adjustment is quick. Tears will usually disappear after Mommy and Daddy leave the classroom. Do not plead with your child The type integer is the usual choice, as it offers the best balance between range, storage size, and performance The type integer is the usual choice, as it offers the best balance between range, storage size, and performanceThe type integer is the usual choice, as it offers the best balance between range, storage size, and performanceThe type integer is the usual choice, as it offers the best balance between range, storage size, and performanceThe type integer ','1134.26',311353,generate_series(3982,3992),7885,'0101','2002-02-12 01:31:14+1344','2003-11-14 01:41:15','((1,1),(0,1),(1,1))','((2,1)(1,5))','08:00:2b:01:01:03','1-3','Some students may need time to adjust to school.For most children, the adjustment is quick. Tears will usually disappear after Mommy and Daddy leave the classroom. Do not plead with your child The types smallint, integer, and bigint store whole numbers, that is, numbers without fractional components, of various ranges. The types smallint, integer, and bigint store whole numbers, that is, numbers without fractional components, of various ranges. Attempts to store values outside of the allowed range will result in an errorThe types smallint, integer, and bigint store whole numbers, that is, numbers without fractional components, of various ranges.','((6,5)(4,2))','(3,6)',12.233,'((5,4),2)',12,3114,'(1,1,0,3)','2010-03-21',43164,'$1,500.00','192.167.2','126.1.1.1','10:30:55','Parents and other family members are always welcome at Stratford. After the first two weeks ofschool','0','1',33,44);
INSERT INTO heap_tbl(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,a16,a17,a20,a21,a22,a23,a24,a25,a26,a27,a28,a29,a30,a31,a32,a33,a34,a35,a36,a37,a38,a39,a40,a41,a42) values(generate_series(500,510),'F',2010,'f','b','Some students may need time to adjust to school.For most children, the adjustment is quick. Tears will usually disappear after Mommy and Daddy leave the classroom. Do not plead with your child','2001-12-25 02:22:11','Some students may need time to adjust to school.For most children, the adjustment is quick. Tears will usually disappear after Mommy and Daddy leave the classroom. Do not plead with your child',generate_series(2500,2516),'2011-10-12','Some students may need time to adjust to school.For most children, the adjustment is quick. Tears will usually disappear after Mommy and Daddy leave the classroom. Do not plead with your child','Some students may need time to adjust to school.For most children, the adjustment is quick. Tears will usually disappear after Mommy and Daddy leave the classroom. Do not plead with your child The type integer is the usual choice, as it offers the best balance between range, storage size, and performance The type integer is the usual choice, as it offers the best balance between range, storage size, and performanceThe type integer is the usual choice, as it offers the best balance between range, storage size, and performanceThe type integer is the usual choice, as it offers the best balance between range, storage size, and performanceThe type integer ','1134.26',311353,generate_series(3982,3992),7885,'0101','((1,1),(0,1),(1,1))','((2,1)(1,5))','08:00:2b:01:01:03','1-3','Some students may need time to adjust to school.For most children, the adjustment is quick. Tears will usually disappear after Mommy and Daddy leave the classroom. Do not plead with your child The types smallint, integer, and bigint store whole numbers, that is, numbers without fractional components, of various ranges. The types smallint, integer, and bigint store whole numbers, that is, numbers without fractional components, of various ranges. Attempts to store values outside of the allowed range will result in an errorThe types smallint, integer, and bigint store whole numbers, that is, numbers without fractional components, of various ranges.','((6,5)(4,2))','(3,6)',12.233,'((5,4),2)',12,3114,'(1,1,0,3)','2010-03-21',43164,'$1,500.00','192.167.2','126.1.1.1','10:30:55','Parents and other family members are always welcome at Stratford. After the first two weeks ofschool','0','1',33,44);
DELETE FROM heap_tbl WHERE a1 < 5;
DELETE FROM heap_tbl WHERE a1 < 10;
......
......@@ -6,11 +6,11 @@ CREATE EXTERNAL TABLE test_quote1( i text)
location ('file://rh55-qavm65/tmp/quote.csv' )
FORMAT 'csv' (delimiter '|' quote '''') ;
select * from test_quote1 order by i;
select * from test_quote1;
CREATE EXTERNAL TABLE test_quote2( i text)
location ('file://rh55-qavm65/tmp/quote.csv' )
FORMAT 'csv' (delimiter '|' quote '"') ;
select * from test_quote2 order by i;
select * from test_quote2;
......@@ -5,20 +5,20 @@ SET gp_create_table_random_default_distribution=off;
DROP TABLE IF EXISTS ao_table;
DROP TABLE IF EXISTS new_ao_table;
-- end_ignore
CREATE TABLE ao_table ( a int,col001 char DEFAULT 'z',col002 numeric,col003 boolean DEFAULT false,col004 bit(3) DEFAULT '111',col005 text DEFAULT 'pookie', col006 integer[] DEFAULT '{5, 4, 3, 2, 1}', col007 character varying(512) DEFAULT 'Now is the time', col008 character varying DEFAULT 'Now is the time', col009 character varying(512)[], col010 numeric(8),col011 int,col012 double precision, col013 bigint, col014 char(8), col015 bytea,col016 timestamp with time zone,col017 interval, col018 cidr, col019 inet, col020 macaddr,col022 money, col025 circle, col026 box, col027 name,col028 path, col029 int2, col031 bit varying(256),col032 date, col034 lseg,col035 point,col036 polygon,col037 real,col039 time, col040 timestamp )with (appendonly=true);
CREATE TABLE ao_table ( a int,col001 char DEFAULT 'z',col002 numeric,col003 boolean DEFAULT false,col004 bit(3) DEFAULT '111',col005 text DEFAULT 'pookie', col006 integer[] DEFAULT '{5, 4, 3, 2, 1}', col007 character varying(512) DEFAULT 'Now is the time', col008 character varying DEFAULT 'Now is the time', col009 character varying(512)[], col010 numeric(8),col011 int,col012 double precision, col013 bigint, col014 char(8), col015 bytea,col017 interval, col018 cidr, col019 inet, col020 macaddr,col022 money, col025 circle, col026 box, col027 name,col028 path, col029 int2, col031 bit varying(256),col032 date, col034 lseg,col035 point,col036 polygon,col037 real,col039 time, col040 timestamp )with (appendonly=true);
\d+ ao_table
INSERT INTO ao_table VALUES (1,'a',11,true,'111', '1_one', '{1,2,3,4,5}', 'Hello .. how are you 1', 'Hello .. how are you 1', '{one,two,three,four,five}', 12345678, 1, 111.1111, 11, '1_one_11', 'd', '2001-12-13 01:51:15+1359', '11', '0.0.0.0', '0.0.0.0', 'AA:AA:AA:AA:AA:AA', '34.23', '((2,2),1)', '((1,2),(2,1))', 'hello', '((1,2),(2,1))', 11, '010101', '2001-12-13', '((1,1),(2,2))', '(1,1)', '((1,2),(2,3),(3,4),(4,3),(3,2),(2,1))', 111111, '23:00:00', '2001-12-13 01:51:15');
INSERT INTO ao_table VALUES (1,'a',11,true,'111', '1_one', '{1,2,3,4,5}', 'Hello .. how are you 1', 'Hello .. how are you 1', '{one,two,three,four,five}', 12345678, 1, 111.1111, 11, '1_one_11', 'd', '11', '0.0.0.0', '0.0.0.0', 'AA:AA:AA:AA:AA:AA', '34.23', '((2,2),1)', '((1,2),(2,1))', 'hello', '((1,2),(2,1))', 11, '010101', '2001-12-13', '((1,1),(2,2))', '(1,1)', '((1,2),(2,3),(3,4),(4,3),(3,2),(2,1))', 111111, '23:00:00', '2001-12-13 01:51:15');
INSERT INTO ao_table VALUES ( 2, 'b', 22, false, '001', '2_one', '{6,7,8,9,10}', 'Hey.. whtz up 2', 'Hey .. whtz up 2', '{one,two,three,four,five}', 76767669, 1, 222.2222, 11, '2_two_22', 'c', '2002-12-13 01:51:15+1359', '22', '0.0.0.0', '0.0.0.0', 'BB:BB:BB:BB:BB:BB', '200.00', '((3,3),2)', '((3,2),(2,3))', 'hello', '((3,2),(2,3))', 22, '01010100101', '2002-12-13', '((2,2),(3,3))', '(2,2)', '((1,2),(2,3),(3,4),(4,3),(3,2),(2,1))', 11111, '22:00:00', '2002-12-13 01:51:15');
INSERT INTO ao_table VALUES ( 2, 'b', 22, false, '001', '2_one', '{6,7,8,9,10}', 'Hey.. whtz up 2', 'Hey .. whtz up 2', '{one,two,three,four,five}', 76767669, 1, 222.2222, 11, '2_two_22', 'c', '22', '0.0.0.0', '0.0.0.0', 'BB:BB:BB:BB:BB:BB', '200.00', '((3,3),2)', '((3,2),(2,3))', 'hello', '((3,2),(2,3))', 22, '01010100101', '2002-12-13', '((2,2),(3,3))', '(2,2)', '((1,2),(2,3),(3,4),(4,3),(3,2),(2,1))', 11111, '22:00:00', '2002-12-13 01:51:15');
select * from ao_table order by a; -- order 1
CREATE TABLE new_ao_table ( a int,col001 char DEFAULT 'z',col002 numeric,col003 boolean DEFAULT false,col004 bit(3) DEFAULT '111',col005 text DEFAULT 'pookie', col006 integer[] DEFAULT '{5, 4, 3, 2, 1}', col007 character varying(512) DEFAULT 'Now is the time', col008 character varying DEFAULT 'Now is the time', col009 character varying(512)[], col010 numeric(8),col011 int,col012 double precision, col013 bigint, col014 char(8), col015 bytea,col016 timestamp with time zone,col017 interval, col018 cidr, col019 inet, col020 macaddr,col022 money, col025 circle, col026 box, col027 name,col028 path, col029 int2, col031 bit varying(256),col032 date, col034 lseg,col035 point,col036 polygon,col037 real,col039 time, col040 timestamp )with (appendonly=true);
CREATE TABLE new_ao_table ( a int,col001 char DEFAULT 'z',col002 numeric,col003 boolean DEFAULT false,col004 bit(3) DEFAULT '111',col005 text DEFAULT 'pookie', col006 integer[] DEFAULT '{5, 4, 3, 2, 1}', col007 character varying(512) DEFAULT 'Now is the time', col008 character varying DEFAULT 'Now is the time', col009 character varying(512)[], col010 numeric(8),col011 int,col012 double precision, col013 bigint, col014 char(8), col015 bytea,col017 interval, col018 cidr, col019 inet, col020 macaddr,col022 money, col025 circle, col026 box, col027 name,col028 path, col029 int2, col031 bit varying(256),col032 date, col034 lseg,col035 point,col036 polygon,col037 real,col039 time, col040 timestamp )with (appendonly=true);
\d+ new_ao_table
INSERT INTO new_ao_table VALUES (generate_series(500,505),'a',generate_series(500,505),true,'111', '1_one', '{1,2,3,4,5}', 'Hello .. how are you 1', 'Hello .. how are you 1', '{one,two,three,four,five}', generate_series(500,505), generate_series(500,505), 111.1111, generate_series(500,505), '1_one_11', 'd', '2001-12-13 01:51:15+1359', '11', '0.0.0.0', '0.0.0.0', 'AA:AA:AA:AA:AA:AA', '34.23', '((2,2),1)', '((1,2),(2,1))', 'hello', '((1,2),(2,1))', 11, '010101', '2001-12-13', '((1,1),(2,2))', '(1,1)', '((1,2),(2,3),(3,4),(4,3),(3,2),(2,1))', 111111, '23:00:00', '2001-12-13 01:51:15');
INSERT INTO new_ao_table VALUES (generate_series(500,505),'a',generate_series(500,505),true,'111', '1_one', '{1,2,3,4,5}', 'Hello .. how are you 1', 'Hello .. how are you 1', '{one,two,three,four,five}', generate_series(500,505), generate_series(500,505), 111.1111, generate_series(500,505), '1_one_11', 'd', '11', '0.0.0.0', '0.0.0.0', 'AA:AA:AA:AA:AA:AA', '34.23', '((2,2),1)', '((1,2),(2,1))', 'hello', '((1,2),(2,1))', 11, '010101', '2001-12-13', '((1,1),(2,2))', '(1,1)', '((1,2),(2,3),(3,4),(4,3),(3,2),(2,1))', 111111, '23:00:00', '2001-12-13 01:51:15');
select * from new_ao_table order by a; -- order 1
......@@ -6,20 +6,20 @@ DROP TABLE IF EXISTS busted;
DROP TABLE IF EXISTS new_busted;
-- end_ignore
CREATE TABLE busted ( a int,col001 char DEFAULT 'z',col002 numeric,col003 boolean DEFAULT false,col004 bit(3) DEFAULT '111',col005 text DEFAULT 'pookie', col006 integer[] DEFAULT '{5, 4, 3, 2, 1}', col007 character varying(512) DEFAULT 'Now is the time', col008 character varying DEFAULT 'Now is the time', col009 character varying(512)[], col010 numeric(8),col011 int,col012 double precision, col013 bigint, col014 char(8), col015 bytea,col016 timestamp with time zone,col017 interval, col018 cidr, col019 inet, col020 macaddr,col022 money, col024 timetz,col025 circle, col026 box, col027 name,col028 path, col029 int2, col031 bit varying(256),col032 date, col034 lseg,col035 point,col036 polygon,col037 real,col039 time, col040 timestamp )with (orientation='column',appendonly=true);
CREATE TABLE busted ( a int,col001 char DEFAULT 'z',col002 numeric,col003 boolean DEFAULT false,col004 bit(3) DEFAULT '111',col005 text DEFAULT 'pookie', col006 integer[] DEFAULT '{5, 4, 3, 2, 1}', col007 character varying(512) DEFAULT 'Now is the time', col008 character varying DEFAULT 'Now is the time', col009 character varying(512)[], col010 numeric(8),col011 int,col012 double precision, col013 bigint, col014 char(8), col015 bytea,col017 interval, col018 cidr, col019 inet, col020 macaddr,col022 money, col024 timetz,col025 circle, col026 box, col027 name,col028 path, col029 int2, col031 bit varying(256),col032 date, col034 lseg,col035 point,col036 polygon,col037 real,col039 time, col040 timestamp )with (orientation='column',appendonly=true);
\d+ busted
INSERT INTO busted VALUES (1,'a',11,true,'111', '1_one', '{1,2,3,4,5}', 'Hello .. how are you 1', 'Hello .. how are you 1', '{one,two,three,four,five}', 12345678, 1, 111.1111, 11, '1_one_11', 'd', '2001-12-13 01:51:15+1359', '11', '0.0.0.0', '0.0.0.0', 'AA:AA:AA:AA:AA:AA', '34.23', '00:00:00+1359', '((2,2),1)', '((1,2),(2,1))', 'hello', '((1,2),(2,1))', 11, '010101', '2001-12-13', '((1,1),(2,2))', '(1,1)', '((1,2),(2,3),(3,4),(4,3),(3,2),(2,1))', 111111, '23:00:00', '2001-12-13 01:51:15');
INSERT INTO busted VALUES (1,'a',11,true,'111', '1_one', '{1,2,3,4,5}', 'Hello .. how are you 1', 'Hello .. how are you 1', '{one,two,three,four,five}', 12345678, 1, 111.1111, 11, '1_one_11', 'd', '11', '0.0.0.0', '0.0.0.0', 'AA:AA:AA:AA:AA:AA', '34.23', '00:00:00+1359', '((2,2),1)', '((1,2),(2,1))', 'hello', '((1,2),(2,1))', 11, '010101', '2001-12-13', '((1,1),(2,2))', '(1,1)', '((1,2),(2,3),(3,4),(4,3),(3,2),(2,1))', 111111, '23:00:00', '2001-12-13 01:51:15');
INSERT INTO busted VALUES ( 2, 'b', 22, false, '001', '2_one', '{6,7,8,9,10}', 'Hey.. whtz up 2', 'Hey .. whtz up 2', '{one,two,three,four,five}', 76767669, 1, 222.2222, 11, '2_two_22', 'c', '2002-12-13 01:51:15+1359', '22', '0.0.0.0', '0.0.0.0', 'BB:BB:BB:BB:BB:BB', '200.00', '00:00:05', '((3,3),2)', '((3,2),(2,3))', 'hello', '((3,2),(2,3))', 22, '01010100101', '2002-12-13', '((2,2),(3,3))', '(2,2)', '((1,2),(2,3),(3,4),(4,3),(3,2),(2,1))', 11111, '22:00:00', '2002-12-13 01:51:15');
INSERT INTO busted VALUES ( 2, 'b', 22, false, '001', '2_one', '{6,7,8,9,10}', 'Hey.. whtz up 2', 'Hey .. whtz up 2', '{one,two,three,four,five}', 76767669, 1, 222.2222, 11, '2_two_22', 'c', '22', '0.0.0.0', '0.0.0.0', 'BB:BB:BB:BB:BB:BB', '200.00', '00:00:05', '((3,3),2)', '((3,2),(2,3))', 'hello', '((3,2),(2,3))', 22, '01010100101', '2002-12-13', '((2,2),(3,3))', '(2,2)', '((1,2),(2,3),(3,4),(4,3),(3,2),(2,1))', 11111, '22:00:00', '2002-12-13 01:51:15');
select count(*) from busted ;
CREATE TABLE new_busted ( a int,col001 char DEFAULT 'z',col002 numeric,col003 boolean DEFAULT false,col004 bit(3) DEFAULT '111',col005 text DEFAULT 'pookie', col006 integer[] DEFAULT '{5, 4, 3, 2, 1}', col007 character varying(512) DEFAULT 'Now is the time', col008 character varying DEFAULT 'Now is the time', col009 character varying(512)[], col010 numeric(8),col011 int,col012 double precision, col013 bigint, col014 char(8), col015 bytea,col016 timestamp with time zone,col017 interval, col018 cidr, col019 inet, col020 macaddr,col022 money, col024 timetz,col025 circle, col026 box, col027 name,col028 path, col029 int2, col031 bit varying(256),col032 date, col034 lseg,col035 point,col036 polygon,col037 real,col039 time, col040 timestamp )with (orientation='column',appendonly=true);
CREATE TABLE new_busted ( a int,col001 char DEFAULT 'z',col002 numeric,col003 boolean DEFAULT false,col004 bit(3) DEFAULT '111',col005 text DEFAULT 'pookie', col006 integer[] DEFAULT '{5, 4, 3, 2, 1}', col007 character varying(512) DEFAULT 'Now is the time', col008 character varying DEFAULT 'Now is the time', col009 character varying(512)[], col010 numeric(8),col011 int,col012 double precision, col013 bigint, col014 char(8), col015 bytea,col017 interval, col018 cidr, col019 inet, col020 macaddr,col022 money, col024 timetz,col025 circle, col026 box, col027 name,col028 path, col029 int2, col031 bit varying(256),col032 date, col034 lseg,col035 point,col036 polygon,col037 real,col039 time, col040 timestamp )with (orientation='column',appendonly=true);
\d+ new_busted
INSERT INTO new_busted VALUES (generate_series(5,100),'a',generate_series(5,100),true,'111', '1_one', '{1,2,3,4,5}', 'Hello .. how are you 1', 'Hello .. how are you 1', '{one,two,three,four,five}', generate_series(5,100), generate_series(5,100), 111.1111, generate_series(5,100), '1_one_11', 'd', '2001-12-13 01:51:15+1359', '11', '0.0.0.0', '0.0.0.0', 'AA:AA:AA:AA:AA:AA', '34.23', '00:00:00+1359', '((2,2),1)', '((1,2),(2,1))', 'hello', '((1,2),(2,1))', 11, '010101', '2001-12-13', '((1,1),(2,2))', '(1,1)', '((1,2),(2,3),(3,4),(4,3),(3,2),(2,1))', 111111, '23:00:00', '2001-12-13 01:51:15');
INSERT INTO new_busted VALUES (generate_series(5,100),'a',generate_series(5,100),true,'111', '1_one', '{1,2,3,4,5}', 'Hello .. how are you 1', 'Hello .. how are you 1', '{one,two,three,four,five}', generate_series(5,100), generate_series(5,100), 111.1111, generate_series(5,100), '1_one_11', 'd', '11', '0.0.0.0', '0.0.0.0', 'AA:AA:AA:AA:AA:AA', '34.23', '00:00:00+1359', '((2,2),1)', '((1,2),(2,1))', 'hello', '((1,2),(2,1))', 11, '010101', '2001-12-13', '((1,1),(2,2))', '(1,1)', '((1,2),(2,3),(3,4),(4,3),(3,2),(2,1))', 111111, '23:00:00', '2001-12-13 01:51:15');
select count(*) from new_busted ;
-- CO table
select * from sto_alt_co1 order by bigint_col;
text_col | bigint_col | char_vary_col | numeric_col | int_col | int_array_col | after_rename_col | change_datatype_col | a_ts_without | b_ts_with | date_column | col_set_default | added_col
----------+------------+---------------+-------------+---------+---------------+------------------+---------------------+---------------------+------------------------+-------------+-----------------+-----------
0_zero | 0 | 0_zero | 0 | 0 | {0} | 0 | 0 | 2004-10-19 10:23:54 | 2004-10-19 01:23:54-07 | 2000-01-01 | 0 | default
1_zero | 1 | 1_zero | 1 | 1 | {1} | 1 | 1 | 2005-10-19 10:23:54 | 2005-10-19 01:23:54-07 | 2001-01-01 | 1 | default
2_zero | 2 | 2_zero | 2 | 2 | {2} | 2 | 2 | 2006-10-19 10:23:54 | 2006-10-19 01:23:54-07 | 2002-01-01 | 2 | default
3_zero | 3 | 3_zero | 3 | 3 | {3} | 3 | 3 | 2004-10-19 10:23:54 | 2004-10-19 01:23:54-07 | 2000-01-01 | 3 | newcol
4_zero | 4 | 4_zero | 4 | 4 | {4} | 4 | 4 | 2004-10-19 10:23:54 | 2004-10-19 01:23:54-07 | 2000-01-01 | 4 | newcol
5_zero | 5 | 5_zero | 5 | 5 | {5} | 5 | 5 | 2004-10-19 10:23:54 | 2004-10-19 01:23:54-07 | 2000-01-01 | 5 | newcol
6_zero | 6 | 6_zero | 6 | 6 | {6} | 6 | 6 | 2004-10-19 10:23:54 | 2004-10-19 01:23:54-07 | 2000-01-01 | 6 | newcol
text_col | bigint_col | char_vary_col | numeric_col | int_col | int_array_col | after_rename_col | change_datatype_col | a_ts_without | date_column | col_set_default | added_col
----------+------------+---------------+-------------+---------+---------------+------------------+---------------------+---------------------+-------------+-----------------+-----------
0_zero | 0 | 0_zero | 0 | 0 | {0} | 0 | 0 | 2004-10-19 10:23:54 | 2000-01-01 | 0 | default
1_zero | 1 | 1_zero | 1 | 1 | {1} | 1 | 1 | 2005-10-19 10:23:54 | 2001-01-01 | 1 | default
2_zero | 2 | 2_zero | 2 | 2 | {2} | 2 | 2 | 2006-10-19 10:23:54 | 2002-01-01 | 2 | default
3_zero | 3 | 3_zero | 3 | 3 | {3} | 3 | 3 | 2004-10-19 10:23:54 | 2000-01-01 | 3 | newcol
4_zero | 4 | 4_zero | 4 | 4 | {4} | 4 | 4 | 2004-10-19 10:23:54 | 2000-01-01 | 4 | newcol
5_zero | 5 | 5_zero | 5 | 5 | {5} | 5 | 5 | 2004-10-19 10:23:54 | 2000-01-01 | 5 | newcol
6_zero | 6 | 6_zero | 6 | 6 | {6} | 6 | 6 | 2004-10-19 10:23:54 | 2000-01-01 | 6 | newcol
(7 rows)
select * from sto_alt_co4 order by bigint_col;
text_col | bigint_col | char_vary_col | numeric_col | int_col | float_col | int_array_col | before_rename_col | change_datatype_col | a_ts_without | b_ts_with | date_column | col_set_default
----------+------------+---------------+-------------+---------+-----------+---------------+-------------------+---------------------+---------------------+------------------------+-------------+-----------------
0_zero | 0 | 0_zero | 0 | 0 | 0 | {0} | 0 | 0 | 2004-10-19 10:23:54 | 2004-10-19 01:23:54-07 | 2000-01-01 | 0
1_zero | 1 | 1_zero | 1 | 1 | 1 | {1} | 1 | 1 | 2005-10-19 10:23:54 | 2005-10-19 01:23:54-07 | 2001-01-01 | 1
2_zero | 2 | 2_zero | 2 | 2 | 2 | {2} | 2 | 2 | 2006-10-19 10:23:54 | 2006-10-19 01:23:54-07 | 2002-01-01 | 2
text_col | bigint_col | char_vary_col | numeric_col | int_col | float_col | int_array_col | before_rename_col | change_datatype_col | a_ts_without | date_column | col_set_default
----------+------------+---------------+-------------+---------+-----------+---------------+-------------------+---------------------+---------------------+-------------+-----------------
0_zero | 0 | 0_zero | 0 | 0 | 0 | {0} | 0 | 0 | 2004-10-19 10:23:54 | 2000-01-01 | 0
1_zero | 1 | 1_zero | 1 | 1 | 1 | {1} | 1 | 1 | 2005-10-19 10:23:54 | 2001-01-01 | 1
2_zero | 2 | 2_zero | 2 | 2 | 2 | {2} | 2 | 2 | 2006-10-19 10:23:54 | 2002-01-01 | 2
(3 rows)
select count(*) from sto_alt_co2;
......@@ -33,23 +33,23 @@ select count(*) from sto_alt_co3;
-- AO table
select * from sto_alt_ao1 order by bigint_col;
text_col | bigint_col | char_vary_col | numeric_col | int_col | int_array_col | after_rename_col | change_datatype_col | a_ts_without | b_ts_with | date_column | col_set_default | added_col
----------+------------+---------------+-------------+---------+---------------+------------------+---------------------+---------------------+------------------------+-------------+-----------------+-----------
0_zero | 0 | 0_zero | 0 | 0 | {0} | 0 | 0 | 2004-10-19 10:23:54 | 2004-10-19 01:23:54-07 | 2000-01-01 | 0 | default
1_zero | 1 | 1_zero | 1 | 1 | {1} | 1 | 1 | 2005-10-19 10:23:54 | 2005-10-19 01:23:54-07 | 2001-01-01 | 1 | default
2_zero | 2 | 2_zero | 2 | 2 | {2} | 2 | 2 | 2006-10-19 10:23:54 | 2006-10-19 01:23:54-07 | 2002-01-01 | 2 | default
3_zero | 3 | 3_zero | 3 | 3 | {3} | 3 | 3 | 2004-10-19 10:23:54 | 2004-10-19 01:23:54-07 | 2000-01-01 | 3 | newcol
4_zero | 4 | 4_zero | 4 | 4 | {4} | 4 | 4 | 2004-10-19 10:23:54 | 2004-10-19 01:23:54-07 | 2000-01-01 | 4 | newcol
5_zero | 5 | 5_zero | 5 | 5 | {5} | 5 | 5 | 2004-10-19 10:23:54 | 2004-10-19 01:23:54-07 | 2000-01-01 | 5 | newcol
6_zero | 6 | 6_zero | 6 | 6 | {6} | 6 | 6 | 2004-10-19 10:23:54 | 2004-10-19 01:23:54-07 | 2000-01-01 | 6 | newcol
text_col | bigint_col | char_vary_col | numeric_col | int_col | int_array_col | after_rename_col | change_datatype_col | a_ts_without | date_column | col_set_default | added_col
----------+------------+---------------+-------------+---------+---------------+------------------+---------------------+---------------------+-------------+-----------------+-----------
0_zero | 0 | 0_zero | 0 | 0 | {0} | 0 | 0 | 2004-10-19 10:23:54 | 2000-01-01 | 0 | default
1_zero | 1 | 1_zero | 1 | 1 | {1} | 1 | 1 | 2005-10-19 10:23:54 | 2001-01-01 | 1 | default
2_zero | 2 | 2_zero | 2 | 2 | {2} | 2 | 2 | 2006-10-19 10:23:54 | 2002-01-01 | 2 | default
3_zero | 3 | 3_zero | 3 | 3 | {3} | 3 | 3 | 2004-10-19 10:23:54 | 2000-01-01 | 3 | newcol
4_zero | 4 | 4_zero | 4 | 4 | {4} | 4 | 4 | 2004-10-19 10:23:54 | 2000-01-01 | 4 | newcol
5_zero | 5 | 5_zero | 5 | 5 | {5} | 5 | 5 | 2004-10-19 10:23:54 | 2000-01-01 | 5 | newcol
6_zero | 6 | 6_zero | 6 | 6 | {6} | 6 | 6 | 2004-10-19 10:23:54 | 2000-01-01 | 6 | newcol
(7 rows)
select * from sto_alt_ao4 order by bigint_col;
text_col | bigint_col | char_vary_col | numeric_col | int_col | float_col | int_array_col | before_rename_col | change_datatype_col | a_ts_without | b_ts_with | date_column | col_set_default
----------+------------+---------------+-------------+---------+-----------+---------------+-------------------+---------------------+---------------------+------------------------+-------------+-----------------
0_zero | 0 | 0_zero | 0 | 0 | 0 | {0} | 0 | 0 | 2004-10-19 10:23:54 | 2004-10-19 01:23:54-07 | 2000-01-01 | 0
1_zero | 1 | 1_zero | 1 | 1 | 1 | {1} | 1 | 1 | 2005-10-19 10:23:54 | 2005-10-19 01:23:54-07 | 2001-01-01 | 1
2_zero | 2 | 2_zero | 2 | 2 | 2 | {2} | 2 | 2 | 2006-10-19 10:23:54 | 2006-10-19 01:23:54-07 | 2002-01-01 | 2
text_col | bigint_col | char_vary_col | numeric_col | int_col | float_col | int_array_col | before_rename_col | change_datatype_col | a_ts_without | date_column | col_set_default
----------+------------+---------------+-------------+---------+-----------+---------------+-------------------+---------------------+---------------------+-------------+-----------------
0_zero | 0 | 0_zero | 0 | 0 | 0 | {0} | 0 | 0 | 2004-10-19 10:23:54 | 2000-01-01 | 0
1_zero | 1 | 1_zero | 1 | 1 | 1 | {1} | 1 | 1 | 2005-10-19 10:23:54 | 2001-01-01 | 1
2_zero | 2 | 2_zero | 2 | 2 | 2 | {2} | 2 | 2 | 2006-10-19 10:23:54 | 2002-01-01 | 2
(3 rows)
select count(*) from sto_alt_ao2;
......@@ -66,23 +66,23 @@ select count(*) from sto_alt_ao3;
-- Heap table
select * from sto_alt_heap1 order by bigint_col;
text_col | bigint_col | char_vary_col | numeric_col | int_col | int_array_col | after_rename_col | change_datatype_col | a_ts_without | b_ts_with | date_column | col_set_default | added_col
----------+------------+---------------+-------------+---------+---------------+------------------+---------------------+---------------------+------------------------+-------------+-----------------+-----------
0_zero | 0 | 0_zero | 0 | 0 | {0} | 0 | 0 | 2004-10-19 10:23:54 | 2004-10-19 01:23:54-07 | 2000-01-01 | 0 | default
1_zero | 1 | 1_zero | 1 | 1 | {1} | 1 | 1 | 2005-10-19 10:23:54 | 2005-10-19 01:23:54-07 | 2001-01-01 | 1 | default
2_zero | 2 | 2_zero | 2 | 2 | {2} | 2 | 2 | 2006-10-19 10:23:54 | 2006-10-19 01:23:54-07 | 2002-01-01 | 2 | default
3_zero | 3 | 3_zero | 3 | 3 | {3} | 3 | 3 | 2004-10-19 10:23:54 | 2004-10-19 01:23:54-07 | 2000-01-01 | 3 | newcol
4_zero | 4 | 4_zero | 4 | 4 | {4} | 4 | 4 | 2004-10-19 10:23:54 | 2004-10-19 01:23:54-07 | 2000-01-01 | 4 | newcol
5_zero | 5 | 5_zero | 5 | 5 | {5} | 5 | 5 | 2004-10-19 10:23:54 | 2004-10-19 01:23:54-07 | 2000-01-01 | 5 | newcol
6_zero | 6 | 6_zero | 6 | 6 | {6} | 6 | 6 | 2004-10-19 10:23:54 | 2004-10-19 01:23:54-07 | 2000-01-01 | 6 | newcol
text_col | bigint_col | char_vary_col | numeric_col | int_col | int_array_col | after_rename_col | change_datatype_col | a_ts_without | date_column | col_set_default | added_col
----------+------------+---------------+-------------+---------+---------------+------------------+---------------------+---------------------+-------------+-----------------+-----------
0_zero | 0 | 0_zero | 0 | 0 | {0} | 0 | 0 | 2004-10-19 10:23:54 | 2000-01-01 | 0 | default
1_zero | 1 | 1_zero | 1 | 1 | {1} | 1 | 1 | 2005-10-19 10:23:54 | 2001-01-01 | 1 | default
2_zero | 2 | 2_zero | 2 | 2 | {2} | 2 | 2 | 2006-10-19 10:23:54 | 2002-01-01 | 2 | default
3_zero | 3 | 3_zero | 3 | 3 | {3} | 3 | 3 | 2004-10-19 10:23:54 | 2000-01-01 | 3 | newcol
4_zero | 4 | 4_zero | 4 | 4 | {4} | 4 | 4 | 2004-10-19 10:23:54 | 2000-01-01 | 4 | newcol
5_zero | 5 | 5_zero | 5 | 5 | {5} | 5 | 5 | 2004-10-19 10:23:54 | 2000-01-01 | 5 | newcol
6_zero | 6 | 6_zero | 6 | 6 | {6} | 6 | 6 | 2004-10-19 10:23:54 | 2000-01-01 | 6 | newcol
(7 rows)
select * from sto_alt_heap4 order by bigint_col;
text_col | bigint_col | char_vary_col | numeric_col | int_col | float_col | int_array_col | before_rename_col | change_datatype_col | a_ts_without | b_ts_with | date_column | col_set_default
----------+------------+---------------+-------------+---------+-----------+---------------+-------------------+---------------------+---------------------+------------------------+-------------+-----------------
0_zero | 0 | 0_zero | 0 | 0 | 0 | {0} | 0 | 0 | 2004-10-19 10:23:54 | 2004-10-19 01:23:54-07 | 2000-01-01 | 0
1_zero | 1 | 1_zero | 1 | 1 | 1 | {1} | 1 | 1 | 2005-10-19 10:23:54 | 2005-10-19 01:23:54-07 | 2001-01-01 | 1
2_zero | 2 | 2_zero | 2 | 2 | 2 | {2} | 2 | 2 | 2006-10-19 10:23:54 | 2006-10-19 01:23:54-07 | 2002-01-01 | 2
text_col | bigint_col | char_vary_col | numeric_col | int_col | float_col | int_array_col | before_rename_col | change_datatype_col | a_ts_without | date_column | col_set_default
----------+------------+---------------+-------------+---------+-----------+---------------+-------------------+---------------------+---------------------+-------------+-----------------
0_zero | 0 | 0_zero | 0 | 0 | 0 | {0} | 0 | 0 | 2004-10-19 10:23:54 | 2000-01-01 | 0
1_zero | 1 | 1_zero | 1 | 1 | 1 | {1} | 1 | 1 | 2005-10-19 10:23:54 | 2001-01-01 | 1
2_zero | 2 | 2_zero | 2 | 2 | 2 | {2} | 2 | 2 | 2006-10-19 10:23:54 | 2002-01-01 | 2
(3 rows)
select count(*) from sto_alt_heap2;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册