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

Re: Question about SQL statement error

From: Michael Glaesemann <grzm(at)myrealbox(dot)com>
To: Mário Gamito <gamito(at)netual(dot)pt>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Question about SQL statement error
Date: 2004-08-25 11:54:07
Message-ID: (view raw or whole thread)
Lists: pgsql-general
On Aug 25, 2004, at 8:37 PM, Mário Gamito wrote:

> why this gives an error ?
> SELECT url_negado INTO OUTFILE '/tmp/urls_negados.txt' FROM 
> urls_negados;

I'm not sure whether this is a MySQLism or part of the SQL spec not 
implemented in PostgreSQL, but I suspect the former. INTO OUTFILE is 
not valid in PostgreSQL. You might want to look at the COPY command


, or perhaps using \o in psql to redirect results to a file.


The PostgreSQL SQL command reference lists valid SQL syntax. I think 
you'll find it useful.

Michael Glaesemann
grzm myrealbox com

In response to

pgsql-general by date

Next:From: Richard HuxtonDate: 2004-08-25 11:54:59
Subject: Re: Question about SQL statement error
Previous:From: Mário GamitoDate: 2004-08-25 11:37:51
Subject: Question about SQL statement error

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