Re: Explicit psqlrc - Mailing list pgsql-hackers

From Magnus Hagander
Subject Re: Explicit psqlrc
Date
Msg-id 9837222c1003070700p286d8e70la6852e76c434d0e8@mail.gmail.com
Whole thread Raw
In response to Re: Explicit psqlrc  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Explicit psqlrc
List pgsql-hackers
2010/3/6 Tom Lane <tgl@sss.pgh.pa.us>:
> Peter Eisentraut <peter_e@gmx.net> writes:
>> I can see the environment variable variant as an analogy to BASH_ENV,
>> but what is the use case for the --psqlrc option?  Wouldn't it be easier
>> and more useful to just be able to process more than one file, say by
>> specifying -f more than once?
>
> The analogy I was thinking about was psql -X, but I agree that it's
> not obvious why this shouldn't be thought of as an additional -f file.

Uh, I don't follow. When we use -f, we'll run the script and then
exit. The whole point is to run it and *not* exit, since you are
normally using it to set up the environment in psql.

That said, it might certainly be useful to be able to process more
than one file with -f, but that's a different usecase, I think.

-- Magnus HaganderMe: http://www.hagander.net/Work: http://www.redpill-linpro.com/


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: machine-readable pg_controldata?
Next
From: Tom Lane
Date:
Subject: Re: Explicit psqlrc