Re: How to export query results

Поиск
Список
Период
Сортировка
От Scott Marlowe
Тема Re: How to export query results
Дата
Msg-id dcc563d10708210833l2652ad39w165ef6a2c8207f1f@mail.gmail.com
обсуждение исходный текст
Ответ на How to export query results  ("Chris Hoover" <revoohc@gmail.com>)
Ответы Re: How to export query results  ("Chris Hoover" <revoohc@gmail.com>)
Список pgsql-admin
On 8/21/07, Chris Hoover <revoohc@gmail.com> wrote:
> I need some guidance.
>
> I need to have an after insert trigger execute on a specific table and
> export the results of query to a file on the database file system.  Is this
> possible to do from a trigger?  If so, how can I accomplish this?  I am
> drawing a blank on how to export the results of the query.

Yes.  you need to use the copy command inside a function and use
security definer to say that the function runs as a superuser.

В списке pgsql-admin по дате отправления:

Предыдущее
От: "Scott Marlowe"
Дата:
Сообщение: Re: how to call sql code without function
Следующее
От: "Scott Marlowe"
Дата:
Сообщение: Re: Dump & Load a database???