aboutsummaryrefslogtreecommitdiff
path: root/src/tutorial/complex.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2017-05-15 11:33:45 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2017-05-15 11:33:45 -0400
commit53a1aa9f9a6f3711ff5766beca135ddce3f3b4ad (patch)
tree4522019558c11aebe01cb5c38fe0beb83bc6abd6 /src/tutorial/complex.c
parentb3c8630f11445692fd149d3c9bdab65ffd586a3a (diff)
downloadpostgresql-53a1aa9f9a6f3711ff5766beca135ddce3f3b4ad.tar.gz
postgresql-53a1aa9f9a6f3711ff5766beca135ddce3f3b4ad.zip
Fix unsafe reference into relcache in constructed CommentStmt.
The CommentStmt made by RebuildConstraintComment() has to pstrdup the relation name, else it will contain a dangling pointer after that relcache entry is flushed. (I'm less sure that pstrdup'ing conname is necessary, but let's be safe.) Failure to do this leads to weird errors or crashes, as reported by Marko Elezovic. Bug introduced by commit e42375fc8, so back-patch to 9.5 as that was. Fix by David Rowley, regression test by Michael Paquier Discussion: https://postgr.es/m/DB6PR03MB30775D58E732D4EB0C13725B9AE00@DB6PR03MB3077.eurprd03.prod.outlook.com
Diffstat (limited to 'src/tutorial/complex.c')
0 files changed, 0 insertions, 0 deletions