B
B
bamond2019-02-15 14:12:35
PostgreSQL
bamond, 2019-02-15 14:12:35

Why are there different results of executing SQL queries on PG?

good afternoon. There is a request:


SELECT * from public.table WHERE create_date < (NOW() - INTERVAL '35 days') ORDER BY create_date DESC limit 1;

through psql the given request produces 0 lines. through pgadmin gives the desired result.
The user from which the request is executed is the same.

select(NOW() - INTERVAL '35 days');

Gives the correct time (for 35 days ago) both in the console and in pgadmin Tell me
, what could be causing this behavior in the console? Thanks

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey, 2019-02-15
@VladimirAndreev

\c DATABASE_NAME;[ENTER]
remember?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question