Re: proposal: multiple psql option -c
От | Pavel Stehule |
---|---|
Тема | Re: proposal: multiple psql option -c |
Дата | |
Msg-id | CAFj8pRB+RUT8ivv7EH48D7NoQjFyXpt3qjpQRQYS7YYFjHteLw@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: proposal: multiple psql option -c (Jim Nasby <Jim.Nasby@BlueTreble.com>) |
Список | pgsql-hackers |
2015-08-28 23:01 GMT+02:00 Jim Nasby <Jim.Nasby@bluetreble.com>:
On 8/28/15 3:31 PM, David G. Johnston wrote:--psqlrc
; read the standard rc files
--no-psqlrc ; do not read the standard rc files
It belongs in a separate patch, though.
In this patch -g should disable the reading of the standard rc files.
Agreed; I didn't realize -c disabled psqlrc.Yet another option could be added that allows the user to point to a
different set of rc files. Its presence should not cause the
include/exclude behavior to change. That way you can setup a psql
wrapper function or alias that uses a different rc file while still
having control over whether it is included or excluded. The problem
here is exploding the logic in order to deal with both a system and a
user rc file.
If we had a \i variation that didn't fail if the file wasn't readable you could use that to pull a system psqlrc in from your custom one.
The import any file is not problem with -g command - so special option is not necessary probably
psql postgres -g "\i somefile" -g "select xxx" -g "..."
Regards
Pavel
--
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com
В списке pgsql-hackers по дате отправления: