Re: How to export query results

Поиск
Список
Период
Сортировка
От Scott Marlowe
Тема Re: How to export query results
Дата
Msg-id dcc563d10708210921y63cbec7cyc3a0090792fcbf11@mail.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:
> On 8/21/07, Scott Marlowe <scott.marlowe@gmail.com> wrote:
> >
> > Yes.  you need to use the copy command inside a function and use
> > security definer to say that the function runs as a superuser.
> >
>
>
> Ok, I thought from the documentation that copy could only extract entire
> table or a specific column.
>
>  If I want to extract this:
>
>  select x.name,x.create_date
>  from x
>  where x.id = new.id
>
>  how do I get copy to do this (simple example, I know)?

Well, there are a couple of ways to approach this.  One is to select
it into a temp table and then copy that to a file.  Another would be
to use an untrusted pl language (plperlu etc...) to do it.

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

Предыдущее
От: "Chris Hoover"
Дата:
Сообщение: Re: How to export query results
Следующее
От: "Medi Montaseri"
Дата:
Сообщение: ROI on 7.2 to 8.2