Re: Question about SQL statement error

Поиск
Список
Период
Сортировка
От Michael Glaesemann
Тема Re: Question about SQL statement error
Дата
Msg-id 785E1BD1-F68D-11D8-A74B-000A95C88220@myrealbox.com
обсуждение исходный текст
Ответ на Question about SQL statement error  (Mário Gamito <gamito@netual.pt>)
Список 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

<http://www.postgresql.org/docs/current/static/sql-copy.html>

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

<http://www.postgresql.org/docs/current/static/app-psql.html>

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


Michael Glaesemann
grzm myrealbox com


В списке pgsql-general по дате отправления:

Предыдущее
От: Mário Gamito
Дата:
Сообщение: Question about SQL statement error
Следующее
От: Richard Huxton
Дата:
Сообщение: Re: Question about SQL statement error