A bug in the now function?

Moderator: NorbertKrupa

Post Reply
Idan
Newbie
Newbie
Posts: 2
Joined: Tue Jan 21, 2014 3:17 pm

A bug in the now function?

Post by Idan » 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)

id10t
GURU
GURU
Posts: 732
Joined: Mon Apr 16, 2012 2:44 pm

Re: A bug in the now function?

Post by id10t » Tue Jan 21, 2014 3:36 pm

Hi!

[DELETED]
Last edited by id10t on Fri May 08, 2015 9:14 pm, edited 1 time in total.

Idan
Newbie
Newbie
Posts: 2
Joined: Tue Jan 21, 2014 3:17 pm

Re: A bug in the now function?

Post by Idan » Tue Jan 21, 2014 4:07 pm

Hi Daniel,

Thanks for the quick and useful answer.
You are great...

Idan

Post Reply

Return to “Vertica SQL Functions”