Re: Bad cast priority for DATE?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Josh Berkus <josh(at)agliodbs(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Bad cast priority for DATE?
Date: 2010-09-18 00:40:53
Message-ID: 106.1284770453@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Josh Berkus <josh(at)agliodbs(dot)com> writes:
> I was noticing that, where we have a function which has two versions,
> timestamp and timestamptz (for example, date_trunc()), if I use a DATE
> timestamptz is the default cast. Shouldn't timestamp without time zone
> be the default? Is this something we can fix without an overhaul of the
> type casting system?

timestamptz is a preferred type, so no you probably can't change that
without breaking a lot of stuff. It's not immediately clear to me why
that's wrong anyway.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2010-09-18 00:45:00 VACUUM produces odd freespace values
Previous Message Josh Berkus 2010-09-18 00:28:01 Bad cast priority for DATE?