Re: Adding time to DATE type
От | Bruce Momjian |
---|---|
Тема | Re: Adding time to DATE type |
Дата | |
Msg-id | 200010030343.XAA11386@candle.pha.pa.us обсуждение исходный текст |
Ответ на | Re: Adding time to DATE type (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: Adding time to DATE type
|
Список | pgsql-hackers |
Is this something worth addressing? > Peter Eisentraut <peter_e@gmx.net> writes: > > Bruce Momjian writes: > >> Can someone give me a TODO summary for this issue? > > > * make 'text' constants default to text type (not unknown) > > > (I think not everyone's completely convinced on this issue, but I don't > > recall anyone being firmly opposed to it.) > > It would be a mistake to eliminate the distinction between unknown and > text. See for example my just-posted response to John Cochran on > pgsql-general about why 'BOULEVARD'::text behaves differently from > 'BOULEVARD'::char. If string literals are immediately assigned type > text then we will have serious problems with char(n) fields. > > I think it's fine to assign string literals a type of 'unknown' > initially. What we need to do is add a phase of type resolution that > considers treating them as text, but only after the existing logic fails > to deduce a type. > > (BTW it might be better to treat string literals as defaulting to char(n) > instead of text, allowing the normal promotion rules to replace char(n) > with text if necessary. Not sure if that would make things more or less > confusing for operations that intermix fixed- and variable-width char > types.) > > regards, tom lane > -- Bruce Momjian | http://candle.pha.pa.us pgman@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
В списке pgsql-hackers по дате отправления: