On Wed, 25 Aug 2004, [ISO-8859-1] Mário Gamito wrote:
> Hi,
>
> 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.
>
> Sorry for the basic answer :(
>
> Warm Regards,
> Mário Gamito
>
Check out COPY and \copy. COPY is server-side, thus it's executed on
the host the server runs on, with the permissions of the user the server
is running as. \copy is a psql command, thus client-side. It's executed
on the client host and with the permissions of the user running psql (you).
If you are writing your own client application, you can use
COPY ... FROM STDIN and COPY ... TO STDOUT (which is what psql does).
http://www.postgresql.org/docs/7.4/interactive/sql-copy.html
http://www.postgresql.org/docs/7.4/interactive/app-psql.html
.TM.
--
____/ ____/ /
/ / / Marco Colombo
___/ ___ / / Technical Manager
/ / / ESI s.r.l.
_____/ _____/ _/ Colombo@ESI.it