EnE_
EnE_

Reputation: 541

Cannot ADD CONSTRAINT in Postgresql

I am having trouble with what I would think is a pretty simple constraint issue in postgres.

Ruinning:

ALTER TABLE rss_feed_list ADD CONSTRAINT status_type CHECK (feed_status = 'active' OR feed_status 'inactive');

returns the error:

ERROR: type "feed_status" does not exist

Upvotes: 1

Views: 195

Answers (1)

psur
psur

Reputation: 4519

There is no equals sign here:

OR feed_status 'inactive'

It probably should be:

OR feed_status = 'inactive'

Upvotes: 2

Related Questions