Skip to content
This repository was archived by the owner on Sep 27, 2019. It is now read-only.
This repository was archived by the owner on Sep 27, 2019. It is now read-only.

Filter on 'char' field was error while import data by copy #1465

Open
@happyjoblzp

Description

@happyjoblzp
default_database=# CREATE TABLE REGION  ( R_REGIONKEY  INTEGER NOT NULL,R_NAME       CHAR(25) NOT NULL,R_COMMENT    VARCHAR(152));
CREATE TABLE
default_database=# copy region from '/Users/liuliuzhipeng/tpch-dbgen/region.tbl' with(delimiter '|', null '');
COPY 5
default_database=# select * from region;
 r_regionkey |   r_name    |                                                      r_comment                                                      
-------------+-------------+---------------------------------------------------------------------------------------------------------------------
           0 | AFRICA      | lar deposits. blithely final packages cajole. regular waters are final requests. regular accounts are according to 
           2 | ASIA        | ges. thinly even pinto beans ca
           4 | MIDDLE EAST | uickly special accounts cajole carefully blithely close requests. carefully final asymptotes haggle furiousl
           1 | AMERICA     | hs use ironic, even requests. s
           3 | EUROPE      | ly final courts cajole furiously final excuse
(5 rows)

default_database=# select * from region where r_name='ASIA';
 r_regionkey | r_name | r_comment 
-------------+--------+-----------
(0 rows)

default_database=# select * from region where r_regionkey=2;
 r_regionkey | r_name |            r_comment            
-------------+--------+---------------------------------
           2 | ASIA   | ges. thinly even pinto beans ca
(1 row)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions