Argh! What's a 'bpchar'? (copy/serial issues...I think) - Mailing list pgsql-novice

From Ken Corey
Subject Argh! What's a 'bpchar'? (copy/serial issues...I think)
Date
Msg-id 3A6776A3.FA725B59@kencorey.com
Whole thread Raw
Responses Re: Argh! What's a 'bpchar'? (copy/serial issues...I think)
List pgsql-novice
I'm trying to copy some data (several hundred rows) from the file
/tmp/player.txt containing:

9,test16610,EN,NULL,a@b.com
10,test24930,EN,NULL,a@b.com
11,test19829,EN,NULL,a@b.com
12,test6285,EN,Y,a@b.com
13,test20885,EN,NULL,a@b.com
...

into this table:

CREATE TABLE PLAYER
(
    PLAYER_ID   SERIAL,
    PLAYER_NAME varchar(255) NOT NULL,
    PLAYING_FOR varchar(255) NOT NULL,
    CHEAT_FLAG  char(1)      NULL,
    EMAIL       varchar(255) NULL,
    --UNIQUE (PLAYER_NAME,PLAYING_FOR,EMAIL),
    CONSTRAINT PK_PLAYER PRIMARY KEY (PLAYER_ID)
)
;

with this command:

GRE=# copy player from '/tmp/player.txt' using delimiters ',';
ERROR:  Unable to identify an operator '=' for types 'bpchar' and
'varchar'
        You will have to retype this query using an explicit cast
ERROR:  Unable to identify an operator '=' for types 'bpchar' and
'varchar'
        You will have to retype this query using an explicit cast

(I've tried adding a "with null as 'null'", with no success.)

Anyone got a clue for the newbie?

-Ken

pgsql-novice by date:

Previous
From: "Robert D. Nelson"
Date:
Subject: RE: Postgres superuser & password on Red Hat; upgrade
Next
From: Ken Corey
Date:
Subject: Re: Re: Yikes! Bitten by line length?