Re: why doesn't an index help my simple query?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Bierman <bierman(at)apple(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: why doesn't an index help my simple query?
Date: 2003-05-31 03:46:13
Message-ID: 17650.1054352773@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Peter Bierman <bierman(at)apple(dot)com> writes:
> 1) is there an easy way for me to change the type in place?

Not in this case --- the stored representations of timestamp and
timestamp-with-tz differ. (The format is the same but the idea
of what is the zero reference is not.) I'm afraid you have to
dump and reload, or at least use INSERT...SELECT to build a new
table.

> Should the plain 'timestamp' type really default to a different type
> than what all the rest of the timestamp operators prefer?

Tell me about it :-(. SQL92 specifies that "timestamp" means "timestamp
without time zone", but this is an utterly brain-dead default IMHO.
You can check the PG list archives if you want to see past flamewars
about the issue. As a member of the losing side I will gracefully
retire...

regards, tom lane

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message ghaverla 2003-05-31 06:20:49 Re: why doesn't an index help my simple query?
Previous Message Peter Bierman 2003-05-31 03:32:48 Re: why doesn't an index help my simple query?