Search Postgresql Archives

Re: [HACKERS] Is there any utility to update the table whenever text file gets changed?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Sep 14, 2006 at 03:41:06AM -0700, Dhanaraj M wrote:
> Is there any utility in postgresql which can do the following?
 
Moving to pgsql-general, which is the appropriate list for this.

> The utility must update the table whenever there is any change in the 
> text file.
> COPY command helps to do that, though this is not straight forward.
> Can it be automated?

There's nothing in the database that could do this directly. You'd need
some kind of code at the OS level that would watch the file for changes
and then take appropriate action. Any number of languages would be
capable of this. Also note that you should probably do the copy into
something other than the live table in case something goes wrong. You
can then do:

BEGIN;
DROP TABLE real_table;
ALTER TABLE fake_table RENAME real_table;
COMMIT;
-- 
Jim Nasby                                            jim@xxxxxxxxx
EnterpriseDB      http://enterprisedb.com      512.569.9461 (cell)


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux