Re: newbie question: reading sql commands from script

Поиск
Список
Период
Сортировка
От basel novo
Тема Re: newbie question: reading sql commands from script
Дата
Msg-id BAY106-F129EF374E8CD474F3F7846AE6A0@phx.gbl
обсуждение исходный текст
Ответ на Re: newbie question: reading sql commands from script  (Brent Wood <b.wood@niwa.co.nz>)
Список pgsql-general
Thanks to all who answered this question!

>From: Brent Wood <b.wood@niwa.co.nz>
>To: basel novo <baselnovo@hotmail.com>
>CC: pgsql-general@postgresql.org
>Subject: Re: [GENERAL] newbie question: reading sql commands from script
>Date: Wed, 26 Oct 2005 10:36:34 +1300 (NZDT)
>
>
>
>On Tue, 25 Oct 2005, basel novo wrote:
>
> > What is the equivalent of the mysql 'source' command for reading sql
> > commands from ascii script files?
> >
>
>I have not used mysql, so am not familiar with the source command, but to
>have postgres run a set of sql statements/queries from a file you can:
>
>psql <DB> -f "filename"
>
>
>
>also, to run a single command from a script (or commandline)
>
>psql <DB> -c "<sql command>"
>
>
>
>Cheers,
>
>   Brent Wood
>
>---------------------------(end of broadcast)---------------------------
>TIP 5: don't forget to increase your free space map settings

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


В списке pgsql-general по дате отправления:

Предыдущее
От: Miguel
Дата:
Сообщение: Re: problems after pg_resetxlog
Следующее
От: blackwater dev
Дата:
Сообщение: mysql replace in postgreSQL?