blob: 1b35b58201cd84c8b83e7b20dbb046fcf9a934a3 [file] [log] [blame]
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
CREATE TABLE foo (col1 INT,
col2 LONG,
col3 DOUBLE,
col4 FLOAT,
col5 CHAR(5));
CREATE TABLE foo2 (col1 INT,
col2 LONG,
col3 DOUBLE,
col4 FLOAT,
averyverylongcolumnnamefortest CHAR(5));
CREATE TABLE foo3 (col1 INT,
col2 LONG,
col3 DOUBLE,
col4 FLOAT,
col5 CHAR(5));
CREATE INDEX foo3_index_1 ON foo3 (col1) USING CSBTREE;
CREATE TABLE foo4 (col1 INT,
col2 LONG,
col3 DOUBLE,
col4 FLOAT,
col5 CHAR(5));
CREATE INDEX foo4_index_1 ON foo4 (col1, col2) USING CSBTREE;
CREATE INDEX foo4_index_2 ON foo4 (col3, col4) USING CSBTREE;
CREATE TABLE averylongtablenamethatseemstoneverend (col1 INT);
DROP TABLE TEST;
INSERT INTO averylongtablenamethatseemstoneverend VALUES (1);
INSERT INTO averylongtablenamethatseemstoneverend VALUES (2);
INSERT INTO averylongtablenamethatseemstoneverend VALUES (3);
INSERT INTO foo values(1, 1, 1.0, 1.0, 'XYZ');
INSERT INTO foo values(2, 1, 1.0, 1.0, 'XYZ');
INSERT INTO foo values(3, 1, 1.0, 1.0, 'XYZ');
INSERT INTO foo values(4, 1, 1.0, 1.0, 'XYZ');
INSERT INTO foo values(5, 1, 1.0, 1.0, 'XYZ');
INSERT INTO foo2 values(5, 1, 1.0, 1.0, 'XYZ');
INSERT INTO foo2 values(5, 1, 1.0, 1.0, 'XYZ');
INSERT INTO foo3 values(5, 1, 1.0, 1.0, 'XYZZ');
--
==
\d foo
--
Table "foo"
Column | Type
+-------+--------+
col1 | Int
col2 | Long
col3 | Double
col4 | Float
col5 | Char(5)
==
\d foo2
--
Table "foo2"
Column | Type
+-------------------------------+--------+
col1 | Int
col2 | Long
col3 | Double
col4 | Float
averyverylongcolumnnamefortest | Char(5)
==
\d foo3
--
Table "foo3"
Column | Type
+-------+--------+
col1 | Int
col2 | Long
col3 | Double
col4 | Float
col5 | Char(5)
Indexes
"foo3_index_1" CSB_TREE (col1)
==
\d foo4
--
Table "foo4"
Column | Type
+-------+--------+
col1 | Int
col2 | Long
col3 | Double
col4 | Float
col5 | Char(5)
Indexes
"foo4_index_2" CSB_TREE (col3, col4)
"foo4_index_1" CSB_TREE (col1, col2)
==
\d
--
List of relations
Name | Type | Blocks
+--------------------------------------+-------+---------+
foo | table | 1
foo2 | table | 1
foo3 | table | 1
foo4 | table | 0
averylongtablenamethatseemstoneverend | table | 1
==
\d invalidtable
--
ERROR: Unrecognized relation invalidtable (1 : 4)
\d invalidtable
^