------=_Part_16542_25802935.1207739252479
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
The following system constants can be used:
CURRENT_DATE
CURRENT_TIME
CURRENT_TIMESTAMP
LOCAL_TIME
LOCAL_TIMESTAMP
The difference between the LOCAL* and CURRENT* is that CURRENT* ones are
with timezone and LOCAL* are without.
>From what you've written it looks like what you're after is
LOCAL_TIMESTAMP:
sql iidbdb | cat
INGRES TERMINAL MONITOR Copyright 2007 Ingres Cor****ation
Ingres 2006 Release 2 Linux Version II 9.1.0 (a64.lnx/123)NPTL login
Wed Apr 9 11:05:24 2008
continue
* select local_timestamp\g
Executing . . .
+---------------------------------------+
|col1 |
+---------------------------------------+
|2008-04-09 11:05:31.003000001 |
+---------------------------------------+
(1 row)
continue
* \q
Ingres 2006 Release 2 Version II 9.1.0 (a64.lnx/123)NPTL logout
Wed Apr 9 11:05:33 2008
The resolution of the fractional second part (i.e. whether you really get
nanoseconds) is up to the resolution of the system clock. So as you can
see,
barring some rounding, I'm getting milliseconds.
HTH
Paul
On 09/04/2008, Martin Bowes <martin.bowes@[EMAIL PROTECTED]
> wrote:
>
> Hi Everyone,
>
>
>
> What is the ansidate equivalent of 'now'?
>
>
>
> I'm trying to store data in a table and I need the time of storage to be
> as unique as possible. The nanosecond capacity of ansidate seemed to be
the
> way to go. But I cant create an andsidate column with default 'now'.
>
>
>
> Furthermore, the only thing I have found is: select
> timestamp_local(date('now'))\g
>
> Trouble is, the ingresdate 'now' has no sub second capacity, and so the
> returned time always has seconds.000000000.
>
>
>
> The table in question has been in existence for a long time and the
> applications around it have already been built so I need something that
can
> be retro-fitted transparently if possible.
>
>
>
> Martin Bowes
>
> _______________________________________________
> Info-Ingres mailing list
> Info-Ingres@[EMAIL PROTECTED]
> http://www.kettleriverconsulting.com/mailman/listinfo/info-ingres
>
>
--
Paul Mason
------=_Part_16542_25802935.1207739252479
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
The following system constants can be used:<br><br>
CURRENT_DATE <br> CURRENT_TIME<br>
CURRENT_TIMESTAMP<br> LOCAL_TIME<br>
LOCAL_TIMESTAMP<br><br>The difference between the LOCAL* and CURRENT* is
that CURRENT* ones are with timezone and LOCAL* are without.<br>
<br>From what you've written it looks like what you're after is
LOCAL_TIMESTAMP:<br><br> sql iidbdb | cat<br>INGRES TERMINAL MONITOR
Copyright 2007 Ingres Cor****ation<br>Ingres 2006 Release 2 Linux Version
II 9.1.0 (a64.lnx/123)NPTL login<br>
Wed Apr 9 11:05:24 2008<br><br>continue<br>* select
local_timestamp\g<br>Executing . .
.<br><br><br>+---------------------------------------+<br>|col1
|<br>+---------------------------------------+<br>
|2008-04-09
11:05:31.003000001
|<br>+---------------------------------------+<br>(1 row)<br>continue<br>*
\q<br>Ingres 2006 Release 2 Version II 9.1.0 (a64.lnx/123)NPTL
logout<br>Wed Apr 9 11:05:33 2008<br><br>The resolution of the
fractional second part (i.e. whether you really get nanoseconds) is up to
the resolution of the system clock. So as you can see, barring some
rounding, I'm getting milliseconds.<br>
<br>HTH<br>Paul<br><br><div><span class="gmail_quote">On 09/04/2008, <b
class="gmail_sendername">Martin Bowes</b> <<a
href="mailto:martin.bowes@[EMAIL PROTECTED]
">martin.bowes@[EMAIL PROTECTED]
>>
wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid
rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div link="blue" vlink="purple" lang="EN-GB">
<div>
<p>Hi Everyone,</p>
<p> </p>
<p>What is the ansidate equivalent of 'now'?</p>
<p> </p>
<p>I'm trying to store data in a table and I need the time of
storage to be as unique as possible. The nanosecond capacity of ansidate
seemed
to be the way to go. But I cant create an andsidate column with default
'now'.</p>
<p> </p>
<p>Furthermore, the only thing I have found is: select
timestamp_local(date('now'))\g</p>
<p>Trouble is, the ingresdate 'now' has no sub second capacity,
and so the returned time always has seconds.000000000.</p>
<p> </p>
<p>The table in question has been in existence for a long time
and the applications around it have already been built so I need something
that
can be retro-fitted transparently if possible.</p>
<p> </p><span class="sg">
<p>Martin Bowes</p>
</span></div>
</div>
<br>_______________________________________________<br>
Info-Ingres mailing list<br>
<a onclick="return top.js.OpenExtLink(window,event,this)"
href="mailto:Info-Ingres@[EMAIL PROTECTED]
">Info-Ingres@[EMAIL PROTECTED]
><br>
<a onclick="return top.js.OpenExtLink(window,event,this)"
href="http://www.kettleriverconsulting.com/mailman/listinfo/info-ingres"
target="_blank">http://www.kettleriverconsulting.com/mailman/listinfo/info-ingres</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Paul Mason
------=_Part_16542_25802935.1207739252479--


|