summaryrefslogtreecommitdiff
path: root/src/tutorial/advanced.source
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2015-07-02 17:02:08 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2015-07-02 17:02:08 -0400
commitac50f84866b22f239025bf37c9c7492cc4ce2dfd (patch)
tree79827f62e9d4752457fc813b09d122d864794d0a /src/tutorial/advanced.source
parent10fb48d66de76e7dc1e36ef18af502ed9600352f (diff)
Fix misuse of TextDatumGetCString().
"TextDatumGetCString(PG_GETARG_TEXT_P(x))" is formally wrong: a text* is not a Datum. Although this coding will accidentally fail to fail on all known platforms, it risks leaking memory if a detoast step is needed, unlike "TextDatumGetCString(PG_GETARG_DATUM(x))" which is what's used elsewhere. Make pg_get_object_address() fall in line with other uses. Noted while reviewing two-arg current_setting() patch.
Diffstat (limited to 'src/tutorial/advanced.source')
0 files changed, 0 insertions, 0 deletions