pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Date format issue
3+ messages / 3 participants
[nested] [flat]

* Date format issue
@ 2004-03-18 05:37  Raman <ramang@smartdatainc.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Raman @ 2004-03-18 05:37 UTC (permalink / raw)
  To: pgsql-sql

Hello All...

In my query of time zone i have details of interval with me like '-9:00',
'+5:30' etc

my problem is regarding the format of Date which i receive... ie. when I add
the interval field the results are like:
Query:
select current_date at TIME ZONE "interval" '+5:30';
      timezone
       11399908 years 8 mons 1538 days



but instead of  interval when i run query like"
Query:
select current_date at TIME ZONE 'IST'
      timezone
       2004-03-17 20:30:00


I want the format should be like 2004-03-17 20:30:00
How can I do that with INTERVAL information with me?? pls guide me..

Also can I have link to some doucmentation where i can read about Date/Time
zone related theroy/functions??

thanks in advance..

regards,
Raman Garg




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Date format issue
@ 2004-03-18 05:58  Stephan Szabo <sszabo@megazone.bigpanda.com>
  parent: Raman <ramang@smartdatainc.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Stephan Szabo @ 2004-03-18 05:58 UTC (permalink / raw)
  To: Raman <ramang@smartdatainc.com>; +Cc: pgsql-sql

On Thu, 18 Mar 2004, Raman wrote:

> In my query of time zone i have details of interval with me like '-9:00',
> '+5:30' etc
>
> my problem is regarding the format of Date which i receive... ie. when I add
> the interval field the results are like:
> Query:
> select current_date at TIME ZONE "interval" '+5:30';
>       timezone
>        11399908 years 8 mons 1538 days

You didn't say what version you're using, but IIRC, there was a bug which
caused the above sort of behavior.  I think it was fixed in 7.4 and could
be fixed in 7.3.x with a catalog change which you might be able to find in
the archives.




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Date format issue
@ 2004-03-18 15:55  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Stephan Szabo <sszabo@megazone.bigpanda.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Tom Lane @ 2004-03-18 15:55 UTC (permalink / raw)
  To: Stephan Szabo <sszabo@megazone.bigpanda.com>; +Cc: Raman <ramang@smartdatainc.com>; pgsql-sql

Stephan Szabo <sszabo@megazone.bigpanda.com> writes:
> You didn't say what version you're using, but IIRC, there was a bug which
> caused the above sort of behavior.  I think it was fixed in 7.4 and could
> be fixed in 7.3.x with a catalog change which you might be able to find in
> the archives.

Good memory!  Here's the CVS log entry:

2003-03-13 23:44  tgl

	* src/include/catalog/pg_proc.h (REL7_3_STABLE): Repair incorrect
	prorettype entry for timestamptz_izone.  Can't force initdb in the
	7.3 branch, but we can at least make it right for people who
	install 7.3.3 from scratch.

It looks like
	UPDATE pg_proc SET prorettype = 1114 WHERE oid = 1026;
would fix it, but I counsel testing that in a scratch database ...

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2004-03-18 15:55 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-03-18 05:37 Date format issue Raman <ramang@smartdatainc.com>
2004-03-18 05:58 ` Stephan Szabo <sszabo@megazone.bigpanda.com>
2004-03-18 15:55   ` Tom Lane <tgl@sss.pgh.pa.us>

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