Undocumented behaviour of \s in SIMILAR TO expression

From: PG Doc comments form <noreply(at)postgresql(dot)org>
To: pgsql-docs(at)lists(dot)postgresql(dot)org
Cc: f2381430(at)mvrht(dot)com
Subject: Undocumented behaviour of \s in SIMILAR TO expression
Date: 2018-12-13 12:48:10
Message-ID: 154470529073.5057.10757027183683688588@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/11/functions-matching.html
Description:

SELECT ' ' SIMILAR TO '[\s]';
returns true

SELECT ' ' SIMILAR TO '[\q]';
generates an error: [2201B]: ERROR: invalid regular expression: invalid
escape \ sequence

\s is not mentioned in the SIMILAR TO section
(https://www.postgresql.org/docs/current/functions-matching.html#FUNCTIONS-SIMILARTO-REGEXP).
If it’s officially supported (which would be useful for my current task), it
should be documented. Otherwise the server should generate an error like for
other invalid escapes.

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message PG Doc comments form 2018-12-13 22:46:22 pgBadger link needs to be updated
Previous Message PG Doc comments form 2018-12-10 10:21:26 citext plugin is not working with java applications