Argh! What's a 'bpchar'? (copy/serial issues...I think)

From: Ken Corey <ken(at)kencorey(dot)com>
To: "pgsql-novice(at)postgresql(dot)org" <pgsql-novice(at)postgresql(dot)org>
Subject: Argh! What's a 'bpchar'? (copy/serial issues...I think)
Date: 2001-01-18 23:05:07
Message-ID: 3A6776A3.FA725B59@kencorey.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

I'm trying to copy some data (several hundred rows) from the file
/tmp/player.txt containing:

9,test16610,EN,NULL,a(at)b(dot)com
10,test24930,EN,NULL,a(at)b(dot)com
11,test19829,EN,NULL,a(at)b(dot)com
12,test6285,EN,Y,a(at)b(dot)com
13,test20885,EN,NULL,a(at)b(dot)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

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Ken Corey 2001-01-18 23:13:29 Re: Re: Yikes! Bitten by line length?
Previous Message Ian Lance Taylor 2001-01-18 22:54:39 Re: Re: Yikes! Bitten by line length?