Hi,

Whenever I try to use the \o or \g options to output a sql query to a
file, I always get a "File or directory does not exist error." The
file does exist and I've given it every permission possible, ensured
it's owned by the postgres user, and made sure it's in a directory
postgres can write to.

What am I doing wrong? I'm using postgresql 8.3.

thanks

Search Discussions

  • Andreas Wenk at Aug 9, 2009 at 8:35 pm

    robin isard wrote:
    Hi,

    Whenever I try to use the \o or \g options to output a sql query to a
    file, I always get a "File or directory does not exist error." The
    file does exist and I've given it every permission possible, ensured
    it's owned by the postgres user, and made sure it's in a directory
    postgres can write to.

    What am I doing wrong? I'm using postgresql 8.3.
    Can you provide the command you use in psql and the following error
    message, the postgresql version you use and the operating system?

    By the way. On a ubuntu box this is working for me:

    test=# \g /tmp/bla.sql

    tmp$ ll
    -rw-r--r-- 1 postgres postgres 598 2009-08-09 22:32 bla.sql


    Cheers

    Andy

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppgsql-novice @
categoriespostgresql
postedAug 9, '09 at 7:52p
activeAug 9, '09 at 8:35p
posts2
users2
websitepostgresql.org
irc#postgresql

2 users in discussion

Andreas Wenk: 1 post Robin isard: 1 post

People

Translate

site design / logo © 2023 Grokbase