From: Chris Hoover <revoohc@gmail.com>
To: Scott Marlowe <scott.marlowe@gmail.com>
Cc: pgsql-admin@postgresql.org Admin <pgsql-admin@postgresql.org>
Subject: Re: How to export query results
Date: Tue, 21 Aug 2007 12:09:41 -0400
Message-ID: <1d219a6f0708210909t663a6a1al8c25bd6f76c99031@mail.gmail.com> (raw)
In-Reply-To: <dcc563d10708210833l2652ad39w165ef6a2c8207f1f@mail.gmail.com>
References: <1d219a6f0708210754v456fecaer68d0420cf2526c12@mail.gmail.com>
<dcc563d10708210833l2652ad39w165ef6a2c8207f1f@mail.gmail.com>
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)?
Thanks,
Chris
PG 8.1
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: revoohc@gmail.com, scott.marlowe@gmail.com
Subject: Re: How to export query results
In-Reply-To: <1d219a6f0708210909t663a6a1al8c25bd6f76c99031@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox