Search Postgresql Archives

Re: Connect to a database in a .sql file

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

 



Assad Jarrahian wrote:
Got it. I will be more careful with words.

Thanks tom for getting 8.1!
one more question.
Where does the directory lie for psql (so I can put a .sql file in there and
run it) for windows?

I'm not familiar with the Windows version, but the psql.exe file should be with all the other executables. You can use the -f flag to supply a file to process:
  psql -f <path-to-sql-file>

Also, if you start psql from a command-prompt you can process a file from within psql using:
  \i <path-to-sql-file>

See the documentation for full details.

--
  Richard Huxton
  Archonet Ltd

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

[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