Re: is there a way - Mailing list pgsql-general

From Oliver Elphick
Subject Re: is there a way
Date
Msg-id 1020349969.30598.9.camel@linda
Whole thread Raw
In response to is there a way  ("Dorward Villaruz" <dorwardv@ntsp.nec.co.jp>)
List 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

Attachment

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Using views and MS access via odbc
Next
From: "Joel Burton"
Date:
Subject: Re: is there a way