Re: Dollar quoting inside a regex bracket expression

From: David Fetter <david(at)fetter(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL Bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: Dollar quoting inside a regex bracket expression
Date: 2004-09-27 19:51:19
Message-ID: 20040927195119.GA9861@fetter.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Sun, Sep 26, 2004 at 11:45:42PM -0400, Tom Lane wrote:
> David Fetter <david(at)fetter(dot)org> writes:
> > CREATE OR REPLACE FUNCTION has_bad_chars(text) RETURNS BOOLEAN
> > AS $function$
> > SELECT $1 ~ $q$[\t\r\n\v|$qq$\$qq$]$q$;
> > $function$ LANGUAGE SQL;
>
> Why would you expect that to work?

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?

Cheers,
D
--
David Fetter david(at)fetter(dot)org http://fetter.org/
phone: +1 510 893 6100 mobile: +1 415 235 3778

Remember to vote!

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Junior - COTRIJUI 2004-09-27 20:05:10 Unscribe (off topic)
Previous Message tgl 2004-09-27 16:13:17 Re: SMTP Server