Re: \copy combine with SELECT - Mailing list pgsql-general

From Martijn van Oosterhout
Subject Re: \copy combine with SELECT
Date
Msg-id 20060317161142.GA7887@svana.org
Whole thread Raw
In response to Re: \copy combine with SELECT  (Chris <dmagick@gmail.com>)
Responses Re: \copy combine with SELECT  ("jia ding" <dingjia@gmail.com>)
List pgsql-general
On Fri, Mar 17, 2006 at 10:45:16AM +1100, Chris wrote:
> Doesn't look like \copy lets you specify which fields to include though.

Ofcourse it does, you just need to use parenthesis. From the manpage:

\copy table [ ( column_list ) ] { from | to } filename | stdin | stdout
[ with ] [ oids ] [ delimiter [as]  'character' ] [ null [as]  'string' ]

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

Attachment

pgsql-general by date:

Previous
From: Randy Yates
Date:
Subject: Re: Encountering NULLS in plpgsql
Next
From: Martijn van Oosterhout
Date:
Subject: Re: picking the correct locale when doing initdb