Project

General

Profile

Feature #6343

current timestamp function for sam queries

Added by Robert Illingworth over 5 years ago. Updated over 5 years ago.

Status:
Accepted
Priority:
Low
Assignee:
-
Target version:
-
Start date:
05/23/2014
Due date:
% Done:

0%

Estimated time:
Duration:

Description

From ServiceNow RITM0100299 (Satish Desai)

It would be useful to add a function for use in sam queries similar to the unix_timestamp function in mysql. This would allow the creation of queries like "data_tier artdaq AND online.RunStartTime > (UNIX_TIMESTAMP() - 86400)" which gets all artdaq files for runs starting in the last 24 hours (24hrs*3600 sec/hr = 86400 sec)

After some discussion with Rob Illingworth, I think it would be better to implement a TIME_SINCE function. Then one could add a constraint like "TIME_SINCE(Online.RunStartTime) < 86400'

History

#1 Updated by Robert Illingworth over 5 years ago

We've discussed this and decided that while it's a reasonable thing to ask for, it is not currently a priority. As part of our migration from Oracle to PostgreSQL we're straightening out the handling of times in the database, and once that is done it should be easier to implement something like this in a consistent manner. For the time being you can use the existing approach at Nova of renaming old definitions and creating a new one with fixed times.

#2 Updated by Robert Illingworth over 5 years ago

  • Description updated (diff)


Also available in: Atom PDF