| -- table with data types that cannot be casted into text |
| CREATE TABLE bit_data ( |
| a bit(3), |
| b bit varying(5) |
| ); |
| |
| COPY bit_data (a, b) FROM stdin; |
| 101 00 |
| \. |
| |
| DROP TABLE IF EXISTS bit_data_summary; |
| SELECT summary('bit_data', 'bit_data_summary'); |
| DROP TABLE IF EXISTS bit_data_summary; |
| SELECT summary('bit_data', 'bit_data_summary', NULL, 'a'); |
| |
| |
| -- normal data |
| CREATE TABLE example_data( |
| id SERIAL, |
| outlook text, |
| temperature float8, |
| humidity float8, |
| windy text, |
| class text) ; |
| |
| COPY example_data (outlook, temperature, humidity, windy, class) FROM stdin DELIMITER ',' NULL '?' ; |
| sunny, 85, 85, false, Don't Play |
| sunny, 80, 90, true, Don't Play |
| overcast, 83, 78, false, Play |
| rain, 70, 96, false, Play |
| rain, 68, 80, false, Play |
| rain, 65, 70, true, Don't Play |
| overcast, 64, 65, true, Play |
| sunny, 72, 95, false, Don't Play |
| sunny, 69, 70, false, Play |
| rain, 75, 80, false, Play |
| sunny, 75, 70, true, Play |
| overcast, 72, 90, true, Play |
| overcast, 81, 75, false, Play |
| rain, 71, 80, true, Don't Play |
| snow, 0, 85, false, Don't Play |
| snow, -9, 72, true, Play |
| sunny, -2, 80, true, Don't play |
| \. |
| |
| DROP TABLE IF EXISTS example_data_summary; |
| SELECT summary('example_data', 'example_data_summary'); |
| SELECT * from example_data_summary; |
| DROP TABLE IF EXISTS example_data_summary; |
| SELECT summary('example_data', 'pg_temp.example_data_summary'); |
| SELECT * from pg_temp.example_data_summary; |
| DROP TABLE IF EXISTS example_data_summary; |
| SELECT summary('example_data', 'example_data_summary', 'windy, Humidity'); |
| SELECT * from example_data_summary; |
| DROP TABLE IF EXISTS example_data_summary; |
| SELECT summary('example_data', 'example_data_summary', 'Windy'); |
| SELECT * from example_data_summary; |
| DROP TABLE IF EXISTS example_data_summary; |
| SELECT summary('example_data', 'example_data_summary', 'id', 'windy'); |
| SELECT * from example_data_summary; |
| DROP TABLE IF EXISTS example_data_summary; |
| SELECT summary('example_data', 'example_data_summary', NULL, NULL, True, True, array[0.1, 0.2, 0.3]); |
| SELECT * from example_data_summary; |
| DROP TABLE IF EXISTS example_data_summary; |
| SELECT summary('example_data', 'example_data_summary', NULL, NULL, True, True, array[0.1, 0.2, 0.3], 10); |
| SELECT * from example_data_summary; |
| DROP TABLE IF EXISTS example_data_summary; |
| SELECT summary('example_data', 'example_data_summary', NULL, NULL, True, True, array[0.1, 0.2, 0.3], 10, False); |
| SELECT * from example_data_summary; |
| DROP TABLE IF EXISTS example_data_summary; |
| SELECT summary('example_data', 'example_data_summary', NULL, NULL, True, True, array[0.1, 0.2, 0.3], 10, False, 2); |
| SELECT * from example_data_summary; |