在運(yùn)行過(guò)程中更改表結(jié)構(gòu)后秉颗,JAVA報(bào)錯(cuò) cached plan must not change result type
原因 :postgres server具有server prepared statement功能痢毒,默認(rèn)啟用
解決方案: 在JDBC連接聲明 prepareThreshold=0 參數(shù)禁用 server端的PS功能即可,如下:
jdbc:postgresql://localhost:5432/ms_example?prepareThreshold=0