From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com> |
Cc: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Robert Haas <robertmhaas(at)gmail(dot)com>, "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>, dinesh kumar <dineshkumar02(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: proposal: multiple psql option -c |
Date: | 2015-08-29 04:37:09 |
Message-ID: | CAFj8pRB+RUT8ivv7EH48D7NoQjFyXpt3qjpQRQYS7YYFjHteLw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
2015-08-28 23:01 GMT+02:00 Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)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
>
From | Date | Subject | |
---|---|---|---|
Next Message | Pavel Stehule | 2015-08-29 04:39:35 | Re: proposal: multiple psql option -c |
Previous Message | Pavel Stehule | 2015-08-29 03:57:07 | Re: [patch] Proposal for \rotate in psql |