On Sun, Oct 24, 2004 at 11:29:13 -0400, Tom Lane <[EMAIL PROTECTED]> wrote: > > Question to think about: should we allow fractional months or days in > the stored representation? There are some places where the existing > restriction that the months field is an integer requires awkward > compromises. On the other hand, it's not real clear what a fractional > month actually means, and similarly a fractional day is hard to assign > meaning to without positing that 1 day == 24 hours.
There are reasonable addition and subtraction operation definitions on two intervals. There might be some application where you want to keep track of fractional months or days. What I am not sure of is would you really have a reason to add fractional months or days to a timestamp. There are a couple reasonable definitions you might make for this definition, but I don't really see a good reason to want this. ne thing to note, when adding intervals you can add the fractions normally. When adding to a date you can get the actual length of the day or month the fractional part adds to, if you wanted to use that information. (Though the resulting day or month may not be the one you added the fractional month to.) I think starting with a type where months and days were integers would be OK, since you could generalize it to handle fractional months and days later and not break applications. Another thing to think about when designing this type, is that when adding timestamps and intervals it makes a difference in which order you add the months, days and seconds. ---------------------------(end of broadcast)--------------------------- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly