Re: review: psql: edit function, show function commands patch
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: David Fetter <david@fetter.org>
Cc: Robert Haas <robertmhaas@gmail.com>, Pavel Stehule <pavel.stehule@gmail.com>, Jan Urbański <wulczer@wulczer.org>, Postgres - Hackers <pgsql-hackers@postgresql.org>
Date: 2010-08-04T14:35:55Z
Lists: pgsql-hackers
David Fetter <david@fetter.org> writes: > On Mon, Aug 02, 2010 at 11:34:02PM -0400, Robert Haas wrote: >> A side question is whether this should be an environment variable or >> a psql variable. > I'd say "yes." As with $EDITOR/PSQL_EDITOR, there should be something > that looks for an overriding psql variable, drops through to look for > an environment variable, and then to a sane default, for some > reasonable value of "sane." Perhaps this default could depend on OS > (Windows vs. Everything Else) to start with. Well, the thing about $EDITOR is that it's a very-widely-understood convention. This one won't be, so the argument for making it an environment variable seems pretty thin. It'd be saner to set it in your ~/.psqlrc file than to add another few nanoseconds to every process launch you ever do. regards, tom lane