I get this error when I try to references to the table meta_host_types:
there is no unique constraint matching given keys for referenced table "meta_host_types"
the table looks like this:
Table "public.meta_host_types"
Column | Type | Modifiers
-------------+---------+---------------------------------------------------------------------
id | integer | not null default nextval('meta_types_application_id_seq'::regclass)
application | integer |
value | text |
comments | text |
types | text |
Indexes:
"meta_types_application_pkey" PRIMARY KEY, btree (id)
"meta_host_types_id_key" UNIQUE, btree (id)
"meta_host_types_value_key" UNIQUE, btree (value, application)
Foreign-key constraints:
"meta_types_application_application_fkey" FOREIGN KEY (application) REFERENCES appsmarteye(id)
Whats the problem??
Can someone please help!
here are the code for the two tables:
Here is the code for the meta_host_types table:
bellus=# create table meta_host_types(id serial,application integer references appsmarteye,
types text,
value text,
comments text,
PRIMARY KEY(id));
-------end of meta_host_types table--------------------
Here are the code for the table that I want to be a references to the meta_host_types table:
bellus=# create table host_application_definition(id serial,type_value integer references meta_host_types,
connection_value integer references meta_connection_methods,
group_value integer references meta_host_grouptypes,
application_value integer references meta_host_types(application),PRIMARY KEY(id)
);
really need help!!!
