Re: Dollar quoting inside a regex bracket expression - Mailing list pgsql-bugs

From Tom Lane
Subject Re: Dollar quoting inside a regex bracket expression
Date
Msg-id 5689.1096315641@sss.pgh.pa.us
Whole thread Raw
In response to Re: Dollar quoting inside a regex bracket expression  (David Fetter <david@fetter.org>)
List pgsql-bugs
David Fetter <david@fetter.org> writes:
> Mis-expectations.  I expected--unreasonably, I see--every part of
> 8.0beta to do dollar quoting and didn't see how the cases of, say,
> pl/python and the regex engine were similar.  Is this worth a mention
> as part of the regex docs, or is my expectation universally
> unreasonable?

Regex patterns don't have the notion of a quoted substring at all, so
it seems moderately unreasonable to me to expect dollar quoting to mean
something to regex (even discounting the fact that it couldn't work
lexically because $ has different lexical properties in a regex
pattern).

The dollar quote stuff is documented as a SQL string constant
representation.  It doesn't seem to me that you'd expect it to work
anywhere except in SQL statements.

            regards, tom lane

pgsql-bugs by date:

Previous
From: "Junior - COTRIJUI"
Date:
Subject: Unscribe (off topic)
Next
From: "PostgreSQL Bugs List"
Date:
Subject: BUG #1270: stack overflow in thread in fe_getauthname