Re: Scheduling data input from tab delimited file via php - Mailing list pgsql-novice

From Keith Worthington
Subject Re: Scheduling data input from tab delimited file via php
Date
Msg-id 44D8DA21.8090300@NarrowPathInc.com
Whole thread Raw
In response to Scheduling data input from tab delimited file via php  ("Dylan Fogarty-MacDonald" <dylan.fm@gmail.com>)
Responses Re: Scheduling data input from tab delimited file via php  (Steve Crawford <scrawford@pinpointresearch.com>)
List pgsql-novice
Dylan Fogarty-MacDonald wrote:
> Hi,
>
> I have a client comprising of a group of car dealerships. Thier
> accounting software uploads via ftp a tab delimited file of their
> updated stock whenever the stock is updated.
>
> What I need to do is execute a php scipt that imports data from the
> file into the database at a regular interval, ie. every hour.
>
> Does postgres have an ability handle this in a different way, maybe by
> removing the need to use php at all?
>
> Can postgres be scheduled for actions like this? Or will I need to
> have the php file schedule the action itself?
>
> Basically, I need to know if postgres can be scheduled, and if it can
> open/execute files on a server.
>
> Thankyou,
> I hope this was written in an understandable way...
>
> -Dylan

Dylan,

We load files that are sent to us randomly.  We did it by creating a
shell script that among other things checks to see if a copy of itself
is already running and pipes data into the sql COPY command.  We also
created a cron entry that launches the shell script every minute.

HTH

--

Kind Regards,
Keith

pgsql-novice by date:

Previous
From: Devrim GUNDUZ
Date:
Subject: Re: installing pgadminIII in fedora core 4
Next
From: Keith Worthington
Date:
Subject: Re: Automatic export