On Thu, Jun 2, 2011 at 12:55 PM, Alvaro Herrera
<alvhe...@commandprompt.com> wrote:
>> >> > One of our customers is interested in being able to store original
>> >> > timezone along with a certain timestamp.
>> >>
>> >> I assume that you're talking about a new data type, not augmenting the
>> >> current types, correct?
>> >
>> > Yes
>>
>> why not use a composite type for that?  performance maybe?
>
> To avoid having to implement all the operators and lookup tables (of
> timezones) in userland, mainly.  Probably performance would be affected
> too, not sure, but that's not the main point.

right -- I see where you are going with this.  ok, some random questions:
*) what about making a 'timezone' type in addition to (or even instead
of) the timezonetz_inputtz?  Then you could in theory treat the your
proposed type as a composite of timezonetz and timezone, just as
timestamptz is a 'composite' of date and timetz.  (note I'm not
necessarily arguing against the creation of a specific unified type --
performance is important for time types).

*) in/out formats...what would be the wire formats of your type -- in
particular, the binary format?

*) do you see your type interacting with various datetime function
(like extract) or will a cast be required?  Interval math?

*) how does ordering and uniqueness apply to same timestamps with
unique input time zones?

merlin

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to