Re: SQL Path in psql
От | Rob Sargentg |
---|---|
Тема | Re: SQL Path in psql |
Дата | |
Msg-id | 522A0E3D.6030609@gmail.com обсуждение исходный текст |
Ответ на | Re: SQL Path in psql (miles <miles@byu.net>) |
Ответы |
Re: SQL Path in psql
|
Список | pgsql-general |
On 09/06/2013 11:05 AM, miles wrote: > Bobby Dewitt wrote >> I come from an Oracle background and I am fairly new to Postgres. >> Oracle's command line utility (SQL*Plus) uses an environment variable >> called SQLPATH to search the given directories for SQL scripts that the >> user calls to execute using a method similar to the \i meta-command in >> psql. This allows users to put SQL scripts in various directories and >> execute them no matter which directory is there current working directory >> in psql. >> >> Is there a similar environment variable that can be used with psql, or >> another way to mimic this behavior? > I'm in the same boat as Bobby. Any feature like this exist? If not, how > would it be requested? > > > > -- > View this message in context: http://postgresql.1045698.n5.nabble.com/SQL-Path-in-psql-tp4413658p5769925.html > Sent from the PostgreSQL - general mailing list archive at Nabble.com. > > I wonder if this would at least get the full path on-screen for a c/p \! for d in $SQLPATH; do find $d -name <script-filename>; done That said, I would down-vote this suggestion. I tend to put sql files in amongst my various project dirs and maintaining the envvar isn't worth it. Anything I re-use I make into a function.
В списке pgsql-general по дате отправления: