Re: How can I make postgre execute file with SQL code, on windows platform

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

 



>    Goal was to get postgre to execute/import an sql dump file, ie not to
> write import-export functionality myself. In the end, I used piping,
> something like this:
>
> system("type $filename | \"C:\Program
> Files\PostgreSQL\8.1\bin\psql.exe\"  -h localhost -p 5432 X6tmp
> \"postgres\"");
>
>    But thanx anyway :)
>
> Boban.

Which is why I said:

---------
You might be better of not doing this with php.

Create the dump on the first machine.
Copy the dump (scp, rsync, copy via samba-mounted drive, whatever)
import it
---------

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux