Skip site navigation (1) Skip section navigation (2)

Automatic SQL command execution

From: "Yos Sunitiyoso" <yos(dot)sunitiyoso(at)gmail(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Automatic SQL command execution
Date: 2008-06-27 09:08:11
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
Dear all,

I am new to PostgreSQL and have just started using it for a few weeks.
I have a (probably very simple) question regarding an execution of a
SQL command which is automatically repeated every period of time. For
example, I want to copy a txt file into a table (e.g. with command
COPY traffic FROM 'C:/TEMP/flow.txt' ) every 5 minutes.  The
'flow.txt' file is produced by an external system and updated (by
overwriting it) every 5 minutes. Can anyone let me know how to do it
or where to put the command in PostgreSQL to automate the execution of
the copy command according to time?
Many thanks in advance.



pgsql-novice by date

Next:From: Sean DavisDate: 2008-06-27 12:02:33
Subject: Re: Automatic SQL command execution
Previous:From: Ridvan Lakas ng Bayan S. BaluyosDate: 2008-06-27 08:26:19
Subject: Re: Dumping tables with only create statements

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group