Re: empty view, replace view, column type change?
От | Tom Lane |
---|---|
Тема | Re: empty view, replace view, column type change? |
Дата | |
Msg-id | 28944.1119623554@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: empty view, replace view, column type change? (Bruce Momjian <pgman@candle.pha.pa.us>) |
Список | pgsql-sql |
Bruce Momjian <pgman@candle.pha.pa.us> writes: > Tom Lane wrote: >> but it doesn't seem to me to follow from what the spec says that we need >> to explicitly cast the result of now() to six places. As long as it's >> coming from gettimeofday it can't have more than 6 places anyway, and so >> we might as well save the extra coercion step. (The parser *will* tack >> on a separate coercion function call when presented with this parse >> tree.) >> >> In short, I'm inclined to remove the above-quoted lines, and similarly >> for CURRENT_TIME, CURRENT_TIMESTAMP, and LOCALTIME. Thoughts? > Agreed. That "6" bothered me too when I was cleaning up the timestamp > code a while back. Done. On re-reading the spec, I see that the default of six places is intended to apply to ALL occurrences of timestamp --- that is, they intendCREATE TABLE foo (ts timestamp); to meanCREATE TABLE foo (ts timestamp(6)); We have deliberately decided not to do that, on a fairly consistent basis --- numeric and varchar don't have any fixed precision limit either if you don't specify. So these functions were out of step with the rest of the system, and removing their explicit precision limit is indeed a sane way of improving consistency. regards, tom lane
В списке pgsql-sql по дате отправления: