1

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

2
  • 2
    You missed equals sign here: feed_status 'inactive' ? Commented Oct 12, 2012 at 6:04
  • I hate myself and I want to die =D Thanks. Commented Oct 12, 2012 at 6:06

1 Answer 1

2

There is no equals sign here:

OR feed_status 'inactive'

It probably should be:

OR feed_status = 'inactive'
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.