pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedSpecial Date/Time Inputs
4+ messages / 2 participants
[nested] [flat]
* Special Date/Time Inputs
@ 2003-02-17 10:53 Tomasz Myrta <jasiek@klaster.net>
2003-02-17 12:12 ` Re: Special Date/Time Inputs A.Bhuvaneswaran <bhuvansql@myrealbox.com>
0 siblings, 1 reply; 4+ messages in thread
From: Tomasz Myrta @ 2003-02-17 10:53 UTC (permalink / raw)
To: pgsql-sql
Hi
How do you use Special Date/Time Inputs described in Table 5.14
(Postgresql documentation)?
It looks like only now() works. When I try to select epoch() I get
error, that such function doesn't exist.
Anyway it came from another problem:
I have table with millions records indexed on timestamp. I tried to
speed up using this table, so I changed timestamp into
seconds-since-epoch (integer). What do you think about it?
Is there a better way to convert this field back into timestamp than
'1970-01-01'::timestamp+cast(field || ' seconds' as interval) ?
Regards,
Tomasz Myrta
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Special Date/Time Inputs
2003-02-17 10:53 Special Date/Time Inputs Tomasz Myrta <jasiek@klaster.net>
@ 2003-02-17 12:12 ` A.Bhuvaneswaran <bhuvansql@myrealbox.com>
2003-02-17 12:17 ` Re: Special Date/Time Inputs Tomasz Myrta <jasiek@klaster.net>
2003-02-17 12:19 ` Re: Special Date/Time Inputs Tomasz Myrta <jasiek@klaster.net>
0 siblings, 2 replies; 4+ messages in thread
From: A.Bhuvaneswaran @ 2003-02-17 12:12 UTC (permalink / raw)
To: pgsql-sql
On Mon, 17 Feb 2003, Tomasz Myrta wrote:
> Hi
> How do you use Special Date/Time Inputs described in Table 5.14
> (Postgresql documentation)?
> It looks like only now() works. When I try to select epoch() I get
> error, that such function doesn't exist.
>
Try,
http://www.postgresql.org/docs/view.php?version=7.3&idoc=1&file=functions-datetime.html
regards,
bhuvaneswaran
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Special Date/Time Inputs
2003-02-17 10:53 Special Date/Time Inputs Tomasz Myrta <jasiek@klaster.net>
2003-02-17 12:12 ` Re: Special Date/Time Inputs A.Bhuvaneswaran <bhuvansql@myrealbox.com>
@ 2003-02-17 12:17 ` Tomasz Myrta <jasiek@klaster.net>
1 sibling, 0 replies; 4+ messages in thread
From: Tomasz Myrta @ 2003-02-17 12:17 UTC (permalink / raw)
To: A.Bhuvaneswaran <bhuvansql@myrealbox.com>; +Cc: pgsql-sql
A.Bhuvaneswaran wrote:
> On Mon, 17 Feb 2003, Tomasz Myrta wrote:
>
>
>>Hi
>>How do you use Special Date/Time Inputs described in Table 5.14
>>(Postgresql documentation)?
>>It looks like only now() works. When I try to select epoch() I get
>>error, that such function doesn't exist.
>>
>
>
> Try,
>
> http://www.postgresql.org/docs/view.php?version=7.3&idoc=1&file=functions-datetime.html
>
> regards,
> bhuvaneswaran
I know this already - it works fine.
I was talking about epoch() which should be equivalent of
'1970-1-1'::timestamp
Regards,
Tomasz Myrta
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Special Date/Time Inputs
2003-02-17 10:53 Special Date/Time Inputs Tomasz Myrta <jasiek@klaster.net>
2003-02-17 12:12 ` Re: Special Date/Time Inputs A.Bhuvaneswaran <bhuvansql@myrealbox.com>
@ 2003-02-17 12:19 ` Tomasz Myrta <jasiek@klaster.net>
1 sibling, 0 replies; 4+ messages in thread
From: Tomasz Myrta @ 2003-02-17 12:19 UTC (permalink / raw)
To: A.Bhuvaneswaran <bhuvansql@myrealbox.com>; +Cc: pgsql-sql
A.Bhuvaneswaran wrote:
> On Mon, 17 Feb 2003, Tomasz Myrta wrote:
>
>
>>Hi
>>How do you use Special Date/Time Inputs described in Table 5.14
>>(Postgresql documentation)?
>>It looks like only now() works. When I try to select epoch() I get
>>error, that such function doesn't exist.
>>
>
>
> Try,
>
> http://www.postgresql.org/docs/view.php?version=7.3&idoc=1&file=functions-datetime.html
>
> regards,
> bhuvaneswaran
Sorry, I didn't notice James Pye's example on the bottom.
Thanks.
Tomasz Myrta
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2003-02-17 12:19 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-02-17 10:53 Special Date/Time Inputs Tomasz Myrta <jasiek@klaster.net>
2003-02-17 12:12 ` A.Bhuvaneswaran <bhuvansql@myrealbox.com>
2003-02-17 12:17 ` Tomasz Myrta <jasiek@klaster.net>
2003-02-17 12:19 ` Tomasz Myrta <jasiek@klaster.net>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox