Kind people,
I'm trying to create a table as follows:
CREATE TABLE media (
media_id SERIAL NOT NULL PRIMARY KEY
, media_type_id INTEGER NOT NULL REFERENCES media_type(media_type_id)
, media_title VARCHAR(255) NOT NULL
, UNIQUE(LOWER(media_title), media_type_id)
);
This barfs with a parse error.
If I leave out the LOWER() part, it works, but I want the thing to be
unique up to case. What's to do?
Big TIA for any hints on this, and I hope to see at least some of you
this evening :)
Cheers,
D
--
David Fetter david(at)fetter(dot)org http://fetter.org/
phone: +1 510 893 6100 cell: +1 415 235 3778