У меня есть таблица, созданная, как это:Как решить 'ERROR: оператора не существует:'?
CREATE TABLE revinfo
(
rev integer NOT NULL,
revtstmp bigint,
CONSTRAINT revinfo_pkey PRIMARY KEY (rev)
)
Внутри этой таблицы, у меня есть данные, как это:
rev |revtstmp
40815|1390021342972
40816|1390021401403
40817|1390021409057
40818|1390021409914
40819|1390021411074
40821|1390021463885
40822|1390021467889
40824|1390021469035
40826|1390021470065
40827|1390021472134
...
Я хочу, чтобы перечислить все изменения, внесенные после 10-го февраля 2015 года I попробовал этот запрос:
select rev
from revinfo
where revtstmp > '2015-02-10 00:00:00'::timestamp
Я ударил эту ошибку: (см перевод ниже)
ERREUR: l'opérateur n'existe pas : bigint > timestamp without time zone
LINE 3: where revtstmp > '2015-02-12 00:00:00'::timestamp
^
HINT: Aucun opérateur ne correspond au nom donné et aux types d'arguments.
Vous devez ajouter des conversions explicites de type.
********** Erreur **********
ERREUR: l'opérateur n'existe pas : bigint > timestamp without time zone
État SQL :42883
Astuce : Aucun opérateur ne correspond au nom donné et aux types d'arguments.
Vous devez ajouter des conversions explicites de type.
Caractère : 47
Как я могу изменить свой запрос?
Translation (питание от Google Translate)
ERROR: operator does not exist: bigint> timestamp without time zone
LINE 3: where revtstmp> '2015-02-12 0:00:00' :: timestamp
^
HINT: No operator matches the given name and argument types.
You must add explicit type conversions.
********** ********** Error
ERROR: operator does not exist: bigint> timestamp without time zone
SQL State: 42883
Tip: No operator matches the given name and argument types.
You must add explicit type conversions.
Character: 47
revtstmp - это не метка времени, это эпоха. Используйте обычные метки времени ISO, и ваша проблема исчезнет. –