Search Postgresql Archives

Re: loading a funtion script from a file

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

 



Gauthier, Dave wrote:
APparently, from "man psql", -c can do only one thing at a time.  But you could do this with 2-3 commands (or 1 if you want to wrap the 2 up in a shell script or something).  Here's an example...
[snip]
psql --dbname mydb -c "\i create_try.sql;"
psql --dbname mydb -c "select trythis('foo');"
psql --dbname mydb -c "drop function trythis(varchar);"

Or just put everything in one file and use -f <filename>
--
  Richard Huxton
  Archonet Ltd

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
      choose an index scan if your joining column's datatypes do not
      match

[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