I am trying to define a new domain "rating_int" that I would be able to use in the table "Review". Anytime I try to execute this query, it returns this message:
ERROR: column "rating_int" does not exist
********** Error **********
ERROR: column "rating_int" does not exist
SQL state: 42703
I followed the exact same code format as the postgresql example and I do not know why my code is returning an error.
CREATE DOMAIN rating_int AS INTEGER
CHECK(rating_int > 0 AND rating_int <=10);
CREATE TABLE Review
(
paper_id INTEGER,
rv_email VARCHAR(55) NOT NULL,
reccomendation TEXT,
a_comments TEXT,
c_comments TEXT,
technical_merit rating_int,
readability rating_int,
orginality rating_int,
relevance rating_int,
PRIMARY KEY(paper_id, rv_email),
FOREIGN KEY(paper_id) REFERENCES Paper
ON DELETE RESTRICT ON UPDATE CASCADE,
FOREIGN KEY(rv_email) REFERENCES Reviewer
ON DELETE SET NULL ON UPDATE CASCADE
);