Search Postgresql Archives

Re: SQL Path in psql

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.


--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux