digoal PostgreSQL 9.3 New Features Extract

digoal PostgreSQL 9.3 New Features Extract

ID:33637608

大小:5.98 MB

页数:52页

时间:2019-02-27

digoal PostgreSQL 9.3 New Features Extract_第1页
digoal PostgreSQL 9.3 New Features Extract_第2页
digoal PostgreSQL 9.3 New Features Extract_第3页
digoal PostgreSQL 9.3 New Features Extract_第4页
digoal PostgreSQL 9.3 New Features Extract_第5页
资源描述:

《digoal PostgreSQL 9.3 New Features Extract》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库

1、PostgreSQL9.3NewFeaturesExtractDigoal.zhouSunday,October20,20132013PostgreSQLChinaConferenceSKYMOBI,Hangzhou,ZhejiangNewFeatureChangemulticolumnONUPDATESETNULL/SETDEFAULTforeignkeyactionstoaffectallcolumnsoftheconstraint,notjustthosechangedintheUPDATE(TomLane)Prev

2、iously,wewouldsetonlythosereferencingcolumnsthatcorrespondtoreferencedcolumnsthatwerechangedbytheUPDATE.ThiswaswhatwasrequiredbySQL-92,butmorerecenteditionsoftheSQLstandardspecifythenewbehavior.http://blog.163.com/digoal@126/blog/static/16387704020134625336626/psq

3、l(9.2.4)digoal=#createtableb(c1int,c2int,c3text,primarykey(c1,c2));digoal=#createtablea(c1int,c2int,c3text,foreignkey(c1,c2)referencesb(c1,c2)onupdatesetnull);digoal=#insertintobvalues(1,2,3);digoal=#insertintoavalues(1,2,3);digoal=#updatebsetc1=2;--foreign表只对

4、c1列也就是updated的列setnulldigoal=#select*froma;c1

5、c2

6、c3

7、2

8、3digoal=#select*fromb;c1

9、c2

10、c32

11、2

12、3NewFeatureChangemulticolumnONUPDATESETNULL/SETDEFAULTforeignkeyactionstoaffectallcolumnsoftheconstraint,notjustthosechangedintheUPDATE(TomLane)Previously,wewouldsetonlyt

13、hosereferencingcolumnsthatcorrespondtoreferencedcolumnsthatwerechangedbytheUPDATE.ThiswaswhatwasrequiredbySQL-92,butmorerecenteditionsoftheSQLstandardspecifythenewbehavior.http://blog.163.com/digoal@126/blog/static/16387704020134625336626/psql(9.3devel)digoal=#cr

14、eatetableb(c1int,c2int,c3text,primarykey(c1,c2));digoal=#createtablea(c1int,c2int,c3text,foreignkey(c1,c2)referencesb(c1,c2)onupdatesetnull);digoal=#insertintobvalues(1,2,3);digoal=#insertintoavalues(1,2,3);digoal=#updatebsetc1=2;--foreign表对整个foreignkeysc1,c2列都

15、setnulldigoal=#select*froma;c1

16、c2

17、c3

18、

19、3digoal=#select*fromb;c1

20、c2

21、c32

22、2

23、3NewFeatureForcecachedplanstobereplannedifthesearch_pathchanges(TomLane)Previously,cachedplansalreadygeneratedinthecurrentsessionwerenotredoneifthequerywasre-executedwithanewsearch_paths

24、etting,resultinginsurprisingbehavior.http://blog.163.com/digoal@126/blog/static/16387704020139228113596/PostgreSQL9.2postgres=#createsc

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。