Re: is there a way

From: Oliver Elphick <olly(at)lfix(dot)co(dot)uk>
To: Dorward Villaruz <dorwardv(at)ntsp(dot)nec(dot)co(dot)jp>
Cc: Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Re: is there a way
Date: 2002-05-02 14:32:49
Message-ID: 1020349969.30598.9.camel@linda
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(dot)Elphick(at)lfix(dot)co(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Joel Burton 2002-05-02 14:43:25 Re: is there a way
Previous Message Fran Fabrizio 2002-05-02 14:30:50 Re: Joe Celko Function : problem