Re: psql -f doesn't complain about directories

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: psql -f doesn't complain about directories
Date: 2007-11-14 20:18:45
Message-ID: 473B5825.2000007@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Alvaro Herrera wrote:
> Peter Eisentraut wrote:
>
>> Letting psql execute a script file that is really a directory doesn't complain
>> at all:
>>
>> $ psql -f /tmp
>>
>> Should we do some kind of stat() before opening the file and abort if it's a
>> directory?
>>
>
> Actually anything other than a plain file, right? (Do we really want to
> be able to psql -f a_pipe?)
>

I don't see why not.

cheers

andrew

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Martijn van Oosterhout 2007-11-14 20:19:41 Re: psql -f doesn't complain about directories
Previous Message Zdenek Kotala 2007-11-14 20:17:10 Re: Fix pg_dump dependency on postgres.h