Re: [GENERAL] substring and POSIX re's

2005-04-19 Thread Don Isgitt
Michael Fuhr wrote: On Tue, Apr 19, 2005 at 12:39:52PM -0400, Alvaro Herrera wrote: On Tue, Apr 19, 2005 at 10:03:45AM -0600, Michael Fuhr wrote: On Tue, Apr 19, 2005 at 11:17:46AM -0500, Don Isgitt wrote: Thanks, Tom. Interestingly enough, neither my original query or your correct

Re: [GENERAL] substring and POSIX re's

2005-04-19 Thread Michael Fuhr
On Tue, Apr 19, 2005 at 12:39:52PM -0400, Alvaro Herrera wrote: > On Tue, Apr 19, 2005 at 10:03:45AM -0600, Michael Fuhr wrote: > > On Tue, Apr 19, 2005 at 11:17:46AM -0500, Don Isgitt wrote: > > > > > > Thanks, Tom. Interestingly enough, neither my original query or your > > > corrected one retur

Re: [GENERAL] substring and POSIX re's

2005-04-19 Thread Alvaro Herrera
On Tue, Apr 19, 2005 at 10:03:45AM -0600, Michael Fuhr wrote: > On Tue, Apr 19, 2005 at 11:17:46AM -0500, Don Isgitt wrote: > > > > Thanks, Tom. Interestingly enough, neither my original query or your > > corrected one returns anything with pg 7.4--another good reason to > > upgrade to 8.* > > H

Re: [GENERAL] substring and POSIX re's

2005-04-19 Thread Michael Fuhr
On Tue, Apr 19, 2005 at 11:17:46AM -0500, Don Isgitt wrote: > > Thanks, Tom. Interestingly enough, neither my original query or your > corrected one returns anything with pg 7.4--another good reason to > upgrade to 8.* Hmmm...for me both queries give the results shown if I run them in 7.3.9, 7.4

Re: [GENERAL] substring and POSIX re's

2005-04-19 Thread Don Isgitt
Tom Lane wrote: Don Isgitt <[EMAIL PROTECTED]> writes: gds2=# select substring('NE NE SE 2310 FSL 330 FEL' from '^([A-Z][A-Z] )+'); substring --- SE (1 row) The pg docs say that this form of substring uses POSIX re's, and my understanding of POSIX re's is they are always greedy

Re: [GENERAL] substring and POSIX re's

2005-04-19 Thread Tom Lane
Don Isgitt <[EMAIL PROTECTED]> writes: > gds2=# select substring('NE NE SE 2310 FSL 330 FEL' from '^([A-Z][A-Z] )+'); > substring > --- > SE > (1 row) > The pg docs say that this form of substring uses POSIX re's, and my > understanding of POSIX re's is they are always greedy. So, why d