To create index with certain length I use the following query:
CREATE INDEX users_full_name_idx ON users ((full_name::varchar(16)));
This code works fine. However, if I try to do the following:
CREATE INDEX users_full_name_idx ON users (full_name::varchar(16));
I get error. Could anyone explain why we need two braces but not one.