forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit09caa87
Remove useless pstrdups in untransformRelOptions
The two strings are already a single palloc'd chunk, not freed; there'sno reason to allocate separate copies that have the same lifetime.This code is only called in short-lived memory contexts (except in somecases in TopTransactionContext, which is still short-lived enough not toreally matter), and typically only for short arrays, so the memory orcomputation saved is likely negligible. However, let's fix it to avoidleaving a bad example of code to copy. This is the only place I couldfind where we're doing this with makeDefElem().Reported-by: Junwang Zhao <zhjwpku@gmail.com>Discussion:https://postgr.es/m/20220909142050.3vv2hjekppk265dd@alvherre.pgsql1 parentcf0baf7 commit09caa87
1 file changed
+2
-2
lines changedLines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1357 | 1357 |
| |
1358 | 1358 |
| |
1359 | 1359 |
| |
1360 |
| - | |
| 1360 | + | |
1361 | 1361 |
| |
1362 |
| - | |
| 1362 | + | |
1363 | 1363 |
| |
1364 | 1364 |
| |
1365 | 1365 |
| |
|
0 commit comments
Comments
(0)