hi list
why can't i define a primary key on a varchar field as being lower(field)?
i'm getting the following error:
ERROR: syntax error at or near "(" at character 94: PRIMARY KEY ((lower(e_name) ));
here's the sql script:
ALTER TABLE "oldtables"."lexikon_entries"
DROP CONSTRAINT "lexikon_entries_pkey" RESTRICT;
ALTER TABLE "oldtables"."lexikon_entries"
ADD CONSTRAINT "lexikon_entries_pkey"
PRIMARY KEY ((lower(e_name) ));
ALTER INDEX "oldtables"."lexikon_entries_pkey"
OWNER TO "db_outnow";
this seems to work for normal indices... do i really have to create a 2nd index on the same field?
- thomas