Re: Question about SQL statement error - Mailing list pgsql-general

From Richard Huxton
Subject Re: Question about SQL statement error
Date
Msg-id 412C7E13.4060207@archonet.com
Whole thread Raw
In response to Question about SQL statement error  (Mário Gamito <gamito@netual.pt>)
List pgsql-general
Mário Gamito wrote:
> Hi,
>
> I'm a newbie at postgreSQL, although i have years of experience with MySQL.

Hi Mario. No problem, but try not to reply to existing messages to post
a new question.

> My question is (and i tried to found the answer):
> why this gives an error ?
>
> SELECT url_negado INTO OUTFILE '/tmp/urls_negados.txt' FROM urls_negados;

INTO OUTFILE ... is not SQL.

 From psql you can use:
  \o MYFILE.TXT
  SELECT * FROM  ...

SQL syntax is in the "SQL COMMANDS" section of the manuals. See the
"client applications" section for details on psql.

HTH
--
   Richard Huxton
   Archonet Ltd

pgsql-general by date:

Previous
From: Michael Glaesemann
Date:
Subject: Re: Question about SQL statement error
Next
From: Oliver Elphick
Date:
Subject: Re: Question about SQL statement error