Re: SELECT to an external file - Mailing list pgsql-general

From Mário Gamito
Subject Re: SELECT to an external file
Date
Msg-id 412B78ED.8020702@netual.pt
Whole thread Raw
In response to Re: SELECT to an external file  (Oliver Elphick <olly@lfix.co.uk>)
Responses Re: SELECT to an external file
List pgsql-general
Hi,

First of all, thank you for your answers.

Look at this file output:

                                               url_negado
------------------------------------------------------------------------------------------------------
  www.startux.org
  www.hotmail.com
  www.blabla.com
(3 rows)


Is there a way to postgres not print the 1st, 2nd and last line ?
I need a list just with URLs.

Thank you in advance.

Warm Regards,
Mário Gamito

Oliver Elphick wrote:
> On Tue, 2004-08-24 at 18:08, Mário Gamito wrote:
>
>>Hi,
>>
>>How can i draw the results of a SELECT in to a file in the filesystem ?
>
>
> Using psql:
>
>   1.  \o /path/to/file
>       SELECT ... ;
>       \o
>
>   2. psql -d my_database -c "SELECT ... " >/path/to/file
>

pgsql-general by date:

Previous
From: David Wheeler
Date:
Subject: Re: UTF-8 and LIKE vs =
Next
From: Jeff Amiel
Date:
Subject: Re: SELECT to an external file