On Wed, 2004-08-25 at 12:37, Mário Gamito wrote:
> I'm a newbie at postgreSQL, although i have years of experience with MySQL.
> 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;
> Any help would be appreciated.
It isn't valid PostgreSQL syntax. PostgreSQL tries to stick to SQL
standards as far as possible. Use SELECT INTO to create a new table.
To dump to a flat file, use COPY:
COPY urls_negado (url_negado) TO '/tmp/urls_negados.txt';
Nulls will be represented as \N
Oliver Elphick olly(at)lfix(dot)co(dot)uk
Isle of Wight http://www.lfix.co.uk/oliver
GPG: 1024D/A54310EA 92C8 39E7 280E 3631 3F0E 1EC0 5664 7A2F A543 10EA
"But the day of the Lord will come as a thief in the
night. The heavens shall pass away with a great noise,
and the elements shall melt with fervent heat, and the
earth and the works that are therein shall be burned
up." II Peter 3:10
In response to
pgsql-general by date
|Next:||From: David Suela Fernández||Date: 2004-08-25 12:35:48|
|Subject: copy a database|
|Previous:||From: Gaetano Mendola||Date: 2004-08-25 11:55:11|
|Subject: Re: Question about SQL statement error|