The documentation says that \s is whitespace and \S is not whitespace. So far, nothing new to regex users.
But let's check some return values:
SELECT SUBSTRING('abc a c' FROM 'a\\sc');
'a c'
SELECT SUBSTRING('abc a c' FROM 'a[\\s]c'); -- Note the character class
'a c'
SELECT SUBSTRING('abc a c' FROM 'a\\Sc');
'abc'
SELECT SUBSTRING('abc a c' FROM 'a[\\S]c'); -- Note the character class
ERROR: invalid regular expression: invalid escape \ sequence
So it seems, \s can be used in a character class and \S cannot. Why?