COPY when 'filename' is a directory - Mailing list pgsql-bugs

From Douglas Trainor
Subject COPY when 'filename' is a directory
Date
Msg-id 3C461122.98CC6E4D@uic.edu
Whole thread Raw
Responses Re: COPY when 'filename' is a directory  (Brent Verner <brent@rcfile.org>)
List pgsql-bugs
I'd like to report a bug in 7.1.3 psql (at least on a 64-bit Alpha Linux box).
Maybe someone can confirm this or maybe it's fixed in 7.2

The 7.1 documentation ( http://www.postgresql.org/idocs/index.php?sql-copy.html )
for COPY ala

    COPY table FROM 'filename'

says that if it fails you get feedback "ERROR: reason" and if it succeeds
you get feedback "COPY".  However, I goofed today and my filename was a
directory, and I did not get ERROR...  Here is a simplified version
demonstrating the lack of ERROR:

    fred@goo> psql goo
    Welcome to psql, the PostgreSQL interactive terminal.

    Type:  \copyright for distribution terms
           \h for help with SQL commands
           \? for help on internal slash commands
           \g or terminate with semicolon to execute query
           \q to quit

    goo=# DROP TABLE goober;
    DROP
    goo=# CREATE TABLE goober ( family VARCHAR(25), x integer, y integer );
    CREATE
    goo=# COPY goober FROM '/usr/local/pgsql/';
    COPY
    goo=# select count(*) from goober;
     count
    -------
         0
    (1 row)

    goo=# \q

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: Bug #561: typo in trigger.c
Next
From: "Michael Beckstette"
Date:
Subject: Postmaster crash