Re: [HACKERS] Is there any utility to update the table whenever text file gets changed?
В списке pgsql-general по дате отправления:
| От | Jim C. Nasby |
|---|---|
| Тема | Re: [HACKERS] Is there any utility to update the table whenever text file gets changed? |
| Дата | |
| Msg-id | 20060916210234.GD38854@enterprisedb.com обсуждение исходный текст |
| Ответы |
Re: [HACKERS] Is there any utility to update the table whenever text
|
| Список | pgsql-general |
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@nasby.net EnterpriseDB http://enterprisedb.com 512.569.9461 (cell)
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера