Re: PostgreSQL 9.3.5 substring(text from pattern for escape) bug

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Schreiber <bobschreiber(at)charter(dot)net>
Cc: Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>, Daniel Verite <daniel(at)manitou-mail(dot)org>, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: PostgreSQL 9.3.5 substring(text from pattern for escape) bug
Date: 2019-05-13 13:59:05
Message-ID: 16675.1557755945@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Robert Schreiber <bobschreiber(at)charter(dot)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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Peter Eisentraut 2019-05-13 16:28:01 Re: identity not working with inherited table
Previous Message Tom Lane 2019-05-13 13:54:09 Re: BUG #15803: Autocomplete issues in new 11.3 and 9.6.13 psql client