Re: PostgreSQL 9.3.5 substring(text from pattern for escape) bug - Mailing list pgsql-bugs

From Tom Lane
Subject Re: PostgreSQL 9.3.5 substring(text from pattern for escape) bug
Date
Msg-id 16675.1557755945@sss.pgh.pa.us
Whole thread Raw
In response to Re: PostgreSQL 9.3.5 substring(text from pattern for escape) bug  (Robert Schreiber <bobschreiber@charter.net>)
List pgsql-bugs
Robert Schreiber <bobschreiber@charter.net> writes:
> Just to be clear here. It seems to me that I am right in that the 
> leading/trailing Q should NOT be returned...

Nope.  The SQL spec's pretty clear that when the first and third
sub-expressions of the pattern can match variable amounts of text,
they're supposed to be matched to the minimum possible amount of text,
which is nothing for a pattern like "Q?".  It is a bug that we're
not doing that as the spec says, but once we fix that, it still won't
act as you're hoping.

            regards, tom lane



pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #15803: Autocomplete issues in new 11.3 and 9.6.13 psql client
Next
From: Peter Eisentraut
Date:
Subject: Re: identity not working with inherited table