"David G. Johnston" <david.g.johns...@gmail.com> writes: > On Mon, Mar 5, 2018 at 7:41 AM, Tom Lane <t...@sss.pgh.pa.us> wrote: >> What would be actually useful is to be able to tab-complete even in >> the midst of a failed transaction block ... but savepoints as such >> won't get us there, and I have no good ideas about what would.
> Why not have psql open two sessions to the backend, one with > application_name 'psql_user' and one with application name "psql_meta" (or > some such) and have all these queries executed on the psql_meta connection? If we did it like that, tab completion would fail to see the session's temp tables, or objects created in the current open transaction. People might bitch about using twice as many connections, too, although likely you could finesse that by only opening the second connection if tab completion actually happens (so that only interactive sessions have one). Still, the local-objects problem seems like a fatal objection. regards, tom lane