Re: to_timestamp docs

2019-05-04 Thread Arthur Zakirov
On Thu, May 2, 2019 at 1:03 AM Arthur Zakirov wrote: > On Thu, May 2, 2019 at 12:49 AM Alexander Korotkov > wrote: > > Actually, FX takes effect on subsequent format patterns. This is not > > documented, but it copycats Oracle behavior. Sure, normally FX should > > be specified as the first ite

Re: to_timestamp docs

2019-05-01 Thread Arthur Zakirov
On Thu, May 2, 2019 at 12:49 AM Alexander Korotkov wrote: > > It works globally (but only for remaining string if you don't put it > > at the beginning) > > and you can set it only once. For example: > > > > =# SELECT to_timestamp('JUL JUL JUL','FXMON_MON_MON'); > > ERROR: invalid value " J" f

Re: to_timestamp docs

2019-05-01 Thread Bruce Momjian
On Thu, May 2, 2019 at 12:49:23AM +0300, Alexander Korotkov wrote: > On Wed, May 1, 2019 at 11:20 PM Arthur Zakirov > wrote: > > Hello, > > Not sure if we need some additional checks here if FX is set. > > I'd like to add that this behavior is not new in 12. It was the same before. Agreed, bu

Re: to_timestamp docs

2019-05-01 Thread Alexander Korotkov
On Wed, May 1, 2019 at 11:20 PM Arthur Zakirov wrote: > Hello, > > On Wed, May 1, 2019 at 6:05 PM Bruce Momjian wrote: > > Thanks. I think I see the sentence you are thinking of: > > > >to_timestamp and to_date > >skip multiple blank spaces at the beginning of the input string >

Re: to_timestamp docs

2019-05-01 Thread Bruce Momjian
On Wed, May 1, 2019 at 11:20:05PM +0300, Arthur Zakirov wrote: > Hello, > > On Wed, May 1, 2019 at 6:05 PM Bruce Momjian wrote: > > Thanks. I think I see the sentence you are thinking of: > > > >to_timestamp and to_date > >skip multiple blank spaces at the beginning of the input

Re: to_timestamp docs

2019-05-01 Thread Arthur Zakirov
Hello, On Wed, May 1, 2019 at 6:05 PM Bruce Momjian wrote: > Thanks. I think I see the sentence you are thinking of: > >to_timestamp and to_date >skip multiple blank spaces at the beginning of the input string >and around date and time values unless the FX >option

Re: to_timestamp docs

2019-05-01 Thread Bruce Momjian
On Wed, May 1, 2019 at 10:01:50AM -0400, Tom Lane wrote: > Bruce Momjian writes: > > I don't think the changes made in PG 12 are documented accurately. > > That code is swapped out of my head at the moment, but it looks > to me like the para before the one you changed is where we discuss > the b

Re: to_timestamp docs

2019-05-01 Thread Tom Lane
Bruce Momjian writes: > I don't think the changes made in PG 12 are documented accurately. That code is swapped out of my head at the moment, but it looks to me like the para before the one you changed is where we discuss the behavior for whitespace. I'm not sure that this change is right, or an

to_timestamp docs

2019-05-01 Thread Bruce Momjian
I don't think the changes made in PG 12 are documented accurately. It currently says: to_timestamp and to_date matches any single separator in the input string or is skipped However, I think it is more accurate to say _multiple_ whitespace can also be matched by a single separato