beta4 accepts foreign key of different type than column

Поиск
Список
Период
Сортировка
От Louis-David Mitterrand
Тема beta4 accepts foreign key of different type than column
Дата
Msg-id 20080106151041.GA21029@apartia.fr
обсуждение исходный текст
Ответы Re: beta4 accepts foreign key of different type than column  (Andrew Dunstan <andrew@dunslane.net>)
Список pgsql-hackers
Hi, 

I changed the data type on a column (to an enum) but the previous 
foreign key to the old table (replaced by the enum) is still accepted 
event though the data types are now different. Is that the expected 
behavior?

CREATE TABLE person_to_event (   id_person integer NOT NULL,   id_event integer NOT NULL,   person_type person_type_new
NOTNULL, -- new ENUM type   "character" text
 
)

ALTER TABLE ONLY person_to_event   ADD CONSTRAINT person_to_event_person_type_fkey FOREIGN KEY (person_type) REFERENCES
person_type(person_type);-- old person_type table, text column
 


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Euler Taveira de Oliveira
Дата:
Сообщение: Re: pg 8.3 Windows installer suggestion
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: beta4 accepts foreign key of different type than column