Thread: date/time type changes
Thomas, are you planning on unifying the date/time types for 7.0? -- Bruce Momjian | http://www.op.net/~candle maillist@candle.pha.pa.us | (610) 853-3000+ If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania19026
> Thomas, are you planning on unifying the date/time types for 7.0? Yes I would like to. But I'll leave it to others to suggest whether it is essential for a major rev bump or could wait until 7.1. afaik it should only take a few days, even at my recent snail's pace of Postgres development :( - Thomas -- Thomas Lockhart lockhart@alumni.caltech.edu South Pasadena, California
> > Thomas, are you planning on unifying the date/time types for 7.0? > > Yes I would like to. But I'll leave it to others to suggest whether it > is essential for a major rev bump or could wait until 7.1. afaik it > should only take a few days, even at my recent snail's pace of > Postgres development :( It is up to you. It would be best to get it in 7.0, but 7.1 is OK too. -- Bruce Momjian | http://www.op.net/~candle maillist@candle.pha.pa.us | (610) 853-3000+ If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania19026
Could you outline the proposed changes? I am currently using datetime and want to make sure my code doesn't break. Steve Thomas Lockhart wrote: > > Thomas, are you planning on unifying the date/time types for 7.0? > > Yes I would like to. But I'll leave it to others to suggest whether it > is essential for a major rev bump or could wait until 7.1. afaik it > should only take a few days, even at my recent snail's pace of > Postgres development :( > > - Thomas > > -- > Thomas Lockhart lockhart@alumni.caltech.edu > South Pasadena, California > > ************
> Could you outline the proposed changes? I am currently using datetime > and want to make sure my code doesn't break. > > > Thomas, are you planning on unifying the date/time types for 7.0? The datetime type will become "timestamp" and the timespan type will become "interval". Both "datetime" and "timespan" will become aliases for timestamp and interval, respectively, and code *should* work without having to be changed. - Thomas -- Thomas Lockhart lockhart@alumni.caltech.edu South Pasadena, California
> > Could you outline the proposed changes? I am currently using datetime > > and want to make sure my code doesn't break. > > > > Thomas, are you planning on unifying the date/time types for 7.0? > > The datetime type will become "timestamp" and the timespan type will > become "interval". Both "datetime" and "timespan" will become aliases > for timestamp and interval, respectively, and code *should* work > without having to be changed. Wouldn't it make more sense to rename timestamp to datetime because datetime is the ANSI name? Just asking. -- Bruce Momjian | http://www.op.net/~candle maillist@candle.pha.pa.us | (610) 853-3000+ If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania19026
> Wouldn't it make more sense to rename timestamp to datetime because > datetime is the ANSI name? Just asking. timestamp is the SQL92 name for the date+time data type. datetime was a name concocted by me to avoid conflicting with other possible standard names when I first implemented the "new and improved" date/time types. Am I missing something in my recollection?? - Thomas -- Thomas Lockhart lockhart@alumni.caltech.edu South Pasadena, California
> > Wouldn't it make more sense to rename timestamp to datetime because > > datetime is the ANSI name? Just asking. > > timestamp is the SQL92 name for the date+time data type. datetime was > a name concocted by me to avoid conflicting with other possible > standard names when I first implemented the "new and improved" > date/time types. Am I missing something in my recollection?? > Oh, I better fix my book. -- Bruce Momjian | http://www.op.net/~candle maillist@candle.pha.pa.us | (610) 853-3000+ If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania19026
> > Wouldn't it make more sense to rename timestamp to datetime because > > datetime is the ANSI name? Just asking. > > timestamp is the SQL92 name for the date+time data type. datetime was > a name concocted by me to avoid conflicting with other possible > standard names when I first implemented the "new and improved" > date/time types. Am I missing something in my recollection?? I had refered to datetime in my book, thinking that was the standard name. I now see it is TIMESTAMP. Good thing someone asked about this. -- Bruce Momjian | http://www.op.net/~candle maillist@candle.pha.pa.us | (610) 853-3000+ If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania19026