Re: explicit cast error - Mailing list pgsql-general

From Joe Conway
Subject Re: explicit cast error
Date
Msg-id 3D25CEE9.2060006@joeconway.com
Whole thread Raw
In response to explicit cast error  (Lynn David Newton <lynn.newton@cox.net>)
List pgsql-general
Lynn David Newton wrote:
> insert into abc
>   (c2, lab, dlab, bdigits) values
>   (5, 'somestring', 'abc123', 3410999762);
>
> psql returns to me this message:
>
> psql: ... ERROR: Unable to identify an operator '=' for types 'int4' and 'text'
>       You will have to retype this query using an explicit cast
>

Try:

insert into abc
   (c2, lab, dlab, bdigits) values
   (5, 'somestring', 'abc123', 3410999762::bigint);

or even:

insert into abc
   (c2, lab, dlab, bdigits) values
   (5, 'somestring', 'abc123', '3410999762');

HTH,

Joe





pgsql-general by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: two primairy key in one table ?
Next
From: Bruno Wolff III
Date:
Subject: Particular query optimization question