Perry Smith wrote:
I want to do something like this:

ALTER TABLE companies ADD CONSTRAINT fk_companies_item_id
             FOREIGN KEY (item_id, 'Company')
             REFERENCES item_bases(item_id, item_type)
             INITIALLY DEFERRED

I could add a column to companies that is always set to "Company" but
that seems like a waste.  I tried the above and I got a syntax error.

Can there be more than one row in "item_bases" with the same "item_id" but different "item_type"s?

--
Lew

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

              http://archives.postgresql.org/

Reply via email to