Re: is there a way

Поиск
Список
Период
Сортировка
От Oliver Elphick
Тема Re: is there a way
Дата
Msg-id 1020349969.30598.9.camel@linda
обсуждение исходный текст
Ответ на is there a way  ("Dorward Villaruz" <dorwardv@ntsp.nec.co.jp>)
Список pgsql-general
On Thu, 2002-05-02 at 18:45, Dorward Villaruz wrote:
> Hello guys, i have a little problem concerning postgres
>
> 1) is there a way to time execution of sql statements in postgres without using any frontend languages like php ?

Not in PostgreSQL itself.  Do it from the Unix shell:

    at '03:15 tomorrow' <<EOC
    psql -d database < /path/to/sql/script1
    psql -d database < /path/to/sql/script2
    EOC

or use cron for regular events.

> 2) is there also a way of inserting 2000000 records to a table without using any frontend languages like php?

Create a text file containing the records and use COPY (in psql)

--
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight                              http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C

     "Bless them which persecute you: bless, and curse not."
                   Romans 12:14

Вложения

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Using views and MS access via odbc
Следующее
От: "Joel Burton"
Дата:
Сообщение: Re: is there a way