Re: [Question]batch execute sql command

Поиск
Список
Период
Сортировка
От Michael Fuhr
Тема Re: [Question]batch execute sql command
Дата
Msg-id 20050424140722.GA66210@winnie.fuhr.org
обсуждение исходный текст
Ответ на [Question]batch execute sql command  (neo anderson <freeonfair@yahoo.co.uk>)
Список pgsql-general
On Sun, Apr 24, 2005 at 02:08:33PM +0100, neo anderson wrote:
>
> i encounter a question when create database schema.
> because i have a sql script, in which contains lots of
> sql command, including insert, create table, create
> index and so on. however, i do know weather postgresql
> supports batch executing sql script or not, for i try
> to run scrtip like what oracle does; yet it seemly
> doesn't  work. would anyone please to telll me how to
> do that?

From within psql you can run "\i filename"; from the command line
you can run "psql -f filename" or, if your shell supports redirection,
"psql < filename".  See the psql documentation for details:

http://www.postgresql.org/docs/8.0/interactive/app-psql.html

If that's not what you're looking for, then please provide more
information about what you're trying to do.

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

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

Предыдущее
От: "Matthew T. O'Connor"
Дата:
Сообщение: Locale question
Следующее
От: Karsten Hilbert
Дата:
Сообщение: Re: timezone() with timeofday() converts the wrong direction?