Re: explicit cast error

Поиск
Список
Период
Сортировка
От Joe Conway
Тема Re: explicit cast error
Дата
Msg-id 3D25CEE9.2060006@joeconway.com
обсуждение исходный текст
Ответ на explicit cast error  (Lynn David Newton <lynn.newton@cox.net>)
Список 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 по дате отправления:

Предыдущее
От: Stephan Szabo
Дата:
Сообщение: Re: two primairy key in one table ?
Следующее
От: Bruno Wolff III
Дата:
Сообщение: Particular query optimization question