"Don Morrison" <donmorrison(at)gmail(dot)com> writes:
> create unique index fooi on foo (lower(substring(name FROM '^\s*(\S*)\s*$')));
> but (at least in postgres 7.4.13) the use of substring doesn't
> work...
You need to double those backslashes.
regards, tom lane