Search Postgresql Archives

Re: Accessing environment variables from psql (SOLVED)

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

 



On Sunday 10 April 2005 03:39, Andreas Seltenreich wrote:

> You can concatenate values using \set. So using
>
>     \set importfile :importdir /test.sql
>     \i :importfile
>
> you won't have to mess with $PWD.

Thanks for the tip, Andreas. But I have about a dozen sql files in the 
import directory, one for each table. So it's actually easier to do a 
cd there and run the import, than to concatenate the pathname to every 
single file name.

However, running an install script from within psql may be the wrong 
approach. I might as well define and populate the database from a shell 
script.
-- 
Leif Biberg Kristensen
http://solumslekt.org/

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
      subscribe-nomail command to majordomo@xxxxxxxxxxxxxx so that your
      message can get through to the mailing list cleanly

[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