Re: [psql] Setting the PROMPT on command line

Поиск
Список
Период
Сортировка
От Neil Conway
Тема Re: [psql] Setting the PROMPT on command line
Дата
Msg-id 1097126144.13817.110.camel@localhost.localdomain
обсуждение исходный текст
Ответ на Re: [psql] Setting the PROMPT on command line  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [psql] Setting the PROMPT on command line  (Neil Conway <neilc@samurai.com>)
Список pgsql-patches
On Thu, 2004-10-07 at 13:46, Tom Lane wrote:
> [ eyeballs that... ]  So a much simpler fix for Ingo's complaint would
> be to move the default settings of PROMPT1 et al (lines 303-306) to the
> vicinity of line 141.

Indeed, that is true -- that's the better fix IMHO. Barring any
objections I'll commit this fix before end-of-day today.

> > On looking at the code closer though, I do see one related problem: we
> > process command-line args before we read psqlrc, so psqlrc settings can
> > override what was specified on the command-line. Shouldn't this happen
> > in reverse?
[...]
> Would it be simple to change?

The main complication is that there is a command-line argument that
instructs psql not to read psqlrc; that means the easy fix of just
reading psqlrc before processing command-line arguments won't work.
Still shouldn't be too complicated to fix (e.g. postpone the -v settings
until we've processed psqlrc but do the rest of the command-line arg
processing immediately), but I'm content to leave it for 8.1

-Neil



В списке pgsql-patches по дате отправления:

Предыдущее
От: Euler Taveira de Oliveira
Дата:
Сообщение: pg_config translation to pt_BR
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: pg_restore - added documentation