Re: substring odd behavior

2022-01-27 Thread Julien Rouhaud
Hi, On Thu, Jan 27, 2022 at 07:54:49PM -0700, David G. Johnston wrote: > On Thu, Jan 27, 2022 at 7:22 PM Regina Obe wrote: > > > Is this intentional behavior? > > > > -- I can do this > > SELECT substring('3.2.0' from '[0-9]*\.([0-9]*)\.'); > > > > -- But can't do this gives error syntax error a

Re: substring odd behavior

2022-01-27 Thread Mark Dilger
> On Jan 27, 2022, at 7:06 PM, Tom Lane wrote: > > In short: you can call substring() with the SQL syntax, which is a > special-purpose production that does not involve any schema name, > or you can call it as an ordinary function with ordinary function > notation. You can't mix pieces of tho

Re: substring odd behavior

2022-01-27 Thread Tom Lane
"David G. Johnston" writes: > On Thu, Jan 27, 2022 at 7:22 PM Regina Obe wrote: >> Is this intentional behavior? >> -- I can do this >> SELECT substring('3.2.0' from '[0-9]*\.([0-9]*)\.'); >> -- But can't do this gives error syntax error at or near "from" >> SELECT pg_catalog.substring('3.2.0' fr

Re: substring odd behavior

2022-01-27 Thread David G. Johnston
On Thu, Jan 27, 2022 at 7:22 PM Regina Obe wrote: > Is this intentional behavior? > > -- I can do this > SELECT substring('3.2.0' from '[0-9]*\.([0-9]*)\.'); > > -- But can't do this gives error syntax error at or near "from" > SELECT pg_catalog.substring('3.2.0' from '[0-9]*\.([0-9]*)\.'); > > s