Re: proposal: multiple psql option -c - Mailing list pgsql-hackers

From Jim Nasby
Subject Re: proposal: multiple psql option -c
Date
Msg-id 55E0CC38.7010505@BlueTreble.com
Whole thread Raw
In response to Re: proposal: multiple psql option -c  ("David G. Johnston" <david.g.johnston@gmail.com>)
Responses Re: proposal: multiple psql option -c
List pgsql-hackers
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.
-- 
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 by date:

Previous
From: Tom Lane
Date:
Subject: Re: Function accepting array of complex type
Next
From: Thomas Munro
Date:
Subject: Re: NOTIFY in Background Worker