A bug in the now function?
Posted: Tue Jan 21, 2014 3:28 pm
I it possible that the now function returns the time the session started and not the current time?
I noticed the following scenario:
[dbadmin@Vertica ~]$ date
Tue Jan 21 16:21:07 IST 2014
[dbadmin@Vertica ~]$ vsql
Welcome to vsql, the Vertica Analytic Database interactive terminal.
Type: \h or \? for help with vsql commands
\g or terminate with semicolon to execute query
\q to quit
dbadmin=> select now();
now
-------------------------------
2014-01-21 16:21:16.554339+02
(1 row)
(Waiting for a bit here)
dbadmin=> select now();
now
-------------------------------
2014-01-21 16:21:16.554339+02
(1 row)
(getting the same result)
dbadmin=> \q
[dbadmin@Vertica ~]$ date
Tue Jan 21 16:21:41 IST 2014
[dbadmin@Vertica ~]$ vsql
Welcome to vsql, the Vertica Analytic Database interactive terminal.
Type: \h or \? for help with vsql commands
\g or terminate with semicolon to execute query
\q to quit
dbadmin=> select now();
now
------------------------------
2014-01-21 16:21:44.37816+02
(1 row)
dbadmin=> select now();
now
------------------------------
2014-01-21 16:21:44.37816+02
(1 row)
I noticed the following scenario:
[dbadmin@Vertica ~]$ date
Tue Jan 21 16:21:07 IST 2014
[dbadmin@Vertica ~]$ vsql
Welcome to vsql, the Vertica Analytic Database interactive terminal.
Type: \h or \? for help with vsql commands
\g or terminate with semicolon to execute query
\q to quit
dbadmin=> select now();
now
-------------------------------
2014-01-21 16:21:16.554339+02
(1 row)
(Waiting for a bit here)
dbadmin=> select now();
now
-------------------------------
2014-01-21 16:21:16.554339+02
(1 row)
(getting the same result)
dbadmin=> \q
[dbadmin@Vertica ~]$ date
Tue Jan 21 16:21:41 IST 2014
[dbadmin@Vertica ~]$ vsql
Welcome to vsql, the Vertica Analytic Database interactive terminal.
Type: \h or \? for help with vsql commands
\g or terminate with semicolon to execute query
\q to quit
dbadmin=> select now();
now
------------------------------
2014-01-21 16:21:44.37816+02
(1 row)
dbadmin=> select now();
now
------------------------------
2014-01-21 16:21:44.37816+02
(1 row)