Re: why doesn't an index help my simple query? - Mailing list pgsql-novice

From Tom Lane
Subject Re: why doesn't an index help my simple query?
Date
Msg-id 17650.1054352773@sss.pgh.pa.us
Whole thread Raw
In response to Re: why doesn't an index help my simple query?  (Peter Bierman <bierman@apple.com>)
Responses Re: why doesn't an index help my simple query?
List pgsql-novice
Peter Bierman <bierman@apple.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

pgsql-novice by date:

Previous
From: Peter Bierman
Date:
Subject: Re: why doesn't an index help my simple query?
Next
From:
Date:
Subject: Re: why doesn't an index help my simple query?