Skip site navigation (1) Skip section navigation (2)

Re: How to export query results

From: "Chris Hoover" <revoohc(at)gmail(dot)com>
To: "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com>
Cc: "pgsql-admin(at)postgresql(dot)org Admin" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: How to export query results
Date: 2007-08-21 16:09:41
Message-ID: 1d219a6f0708210909t663a6a1al8c25bd6f76c99031@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-admin
On 8/21/07, Scott Marlowe <scott(dot)marlowe(at)gmail(dot)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)?

Thanks,

Chris

PG 8.1

In response to

Responses

pgsql-admin by date

Next:From: Scott MarloweDate: 2007-08-21 16:21:03
Subject: Re: How to export query results
Previous:From: Tena SakaiDate: 2007-08-21 15:48:16
Subject: Re: After adjusting checkpoint related entries in postgresql.conf...

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group