Steve <s-psql@rhythm.cx> writes:
> I'm trying to place a literal '-' in a bracketed character set in a regular
> expression for a check constraint.
Per the manual:
To include a literal ] in the list, make it the first character
(following a possible ^). To include a literal -, make it the first or
last character, or the second endpoint of a range. To use a literal - as
the first endpoint of a range, enclose it in [. and .] to make it a
collating element (see below). With the exception of these and some
combinations using [ (see next paragraphs), all other special
characters, including \, lose their special significance within a
bracket expression.
regards, tom lane