Re: date formatting and tab-complete patch
От | Karel Zak |
---|---|
Тема | Re: date formatting and tab-complete patch |
Дата | |
Msg-id | 20011206100322.A23044@zf.jcu.cz обсуждение исходный текст |
Ответ на | Re: date formatting and tab-complete patch (Manuel Sugawara <masm@fciencias.unam.mx>) |
Ответы |
Re: date formatting and tab-complete patch
|
Список | pgsql-hackers |
On Wed, Dec 05, 2001 at 11:33:26AM -0600, Manuel Sugawara wrote: > Karel Zak <zakkr@zf.jcu.cz> writes: > > > > This example shows another issue. With localized month and day names > > > the hardcoded paddings doesn't make sense any more since you may have > > > a month name longer than 9 chars -septiembre- as instance. > > > > Magic "9 chars" is nice and popular Oracle feature :-) It was irony :-) I don't know why Oracle has this stupid feature, butif we want be compatible, we must use it too.... > You think so?, May be it was in the teletype or monospaced display > times. But now? I don't think so. > > > The "9 chars" can be used for English locales only. > > May be add a GUC, something like useless_oracle_compatibility turned > on by default (for the backwards compatibility). Believe me, the I not sure with some global switch like 'useless_oracle_compatibility',here must be way how use old and new features togetherwithoutrestriction. > paddings are mostly useless those days where aplications tends to use > more the web or graphical interfaces than terminals or teletypes. Yesterday I forgot important note: if to_char() will support localesfor datetime output it must be implemented as _new_ feature.It meansthis new implementation must be backward compatible for all currentformat definition. For example: to_char(now(), 'Month') _must_forever_output_: 'December ' and this output must be independent on locales setting. It's important, because a lot of application depend of current outputformat.If someone wants use locale depend output must be possibleset it by some format suffix, for example: to_char(now(), 'LCMonth') (to_char() already knows work with suffixes, for example FM). And mustbe possible mix it in one format definition: to_char(now(),'LCMonth Month') -output-> 'Xxxxxx December ' where 'Xxxxxx' is the Month from locales and 'December ' is outputcompatible with current (Oracle) to_char() and is localeindependen. This solve a problem with "9 Chars", because all non-locales outputor compilation without locales support will use it likenow. It's very simular to number formatting by to_char(). There is two patterns for decimal point, 'D' -- for locale depend deciamlpointand '.' -- for "standard" locales independend. With Months/Days it must be same. Right? Karel -- Karel Zak <zakkr@zf.jcu.cz>http://home.zf.jcu.cz/~zakkr/C, PostgreSQL, PHP, WWW, http://docs.linux.cz, http://mape.jcu.cz
В списке pgsql-hackers по дате отправления: