aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/arrayfuncs.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2021-04-03 17:38:31 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2021-04-03 17:38:31 -0400
commit55873a00e3c3349664e7215077dca74ccea08b4d (patch)
treee93688730e5308b989c392e82fd07057d9fc05b0 /src/backend/utils/adt/arrayfuncs.c
parent225a22b19ed2960acc8e9c0b7ae53e0e5b0eac87 (diff)
downloadpostgresql-55873a00e3c3349664e7215077dca74ccea08b4d.tar.gz
postgresql-55873a00e3c3349664e7215077dca74ccea08b4d.zip
Improve psql's behavior when the editor is exited without saving.
When editing the previous query buffer, if the editor is exited without modifying the temp file then clear the query buffer, rather than re-loading (and probably re-executing) the previous query buffer. This reduces the probability of accidentally re-executing something you didn't intend to. Similarly, in "\e file", if the file isn't actually modified then don't load it into the query buffer. And in "\ef" and "\ev", if no changes are made then clear the query buffer instead of loading the function or view definition into it. Cases where we fail to invoke the editor at all, or it returns a nonzero status, are treated like the no-file-modification case. Laurenz Albe, reviewed by Jacob Champion Discussion: https://postgr.es/m/0ba3f2a658bac6546d9934ab6ba63a805d46a49b.camel@cybertec.at
Diffstat (limited to 'src/backend/utils/adt/arrayfuncs.c')
0 files changed, 0 insertions, 0 deletions