我在学校项目中使用PostgreSQL,并且尝试向数据库表中添加不同的外键,但是例如当我运行时:
ALTER TABLE PARTSUPP ADD FOREIGN KEY (PS_SUPPKEY) REFERENCES SUPPLIER(S_SUPPKEY);
在SQL Shell上,我收到以下错误消息:
server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
The connection to the server was lost. Attempting reset: Failed.
我希望您能帮助我解决这个问题!