Re: Can't copy from file into table

From: Guillaume Perréal <perreal(at)lyon(dot)cemagref(dot)fr>
To: database(at)gurubase(dot)com
Cc: pgsql-general(at)postgreSQL(dot)org
Subject: Re: Can't copy from file into table
Date: 2000-08-03 14:37:35
Message-ID: 398983AF.7D369048@lyon.cemagref.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

database(at)gurubase(dot)com wrote:
>
> Dear all,
>
> I am using
> copy tableA from '/tmp/A.data' and have the following error:
>
> Unable to identify an operatior '=' for types 'varchar'
> You will have to retype this query using an explicit cast.
>
> What is "an explicit cast"?

Something like this:
SELECT '0.80'::float;
The '::float' tell Postgresql to cast '0.80' (a string) in to a real number
(float).

But you can't use an explicit cast in your query. I think the problem comes out
of your table definition.

>
> Best regards,
> Boris

--
Guillaume Perréal - Stagiaire MIAG
Cemagref (URH), Lyon, France
Tél: (+33) 4.72.20.87.64

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2000-08-03 14:56:30 Re: [HACKERS] random() function produces wrong range
Previous Message luc00 2000-08-03 13:51:59 libpq++ app code examples ?