Re: psql -f doesn't complain about directories - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: psql -f doesn't complain about directories
Date
Msg-id 20071114201519.GV19014@alvh.no-ip.org
Whole thread Raw
In response to psql -f doesn't complain about directories  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: psql -f doesn't complain about directories  (Andrew Dunstan <andrew@dunslane.net>)
Re: psql -f doesn't complain about directories  (Martijn van Oosterhout <kleptog@svana.org>)
Re: psql -f doesn't complain about directories  (Zdenek Kotala <Zdenek.Kotala@Sun.COM>)
Re: psql -f doesn't complain about directories  (David Fetter <david@fetter.org>)
List pgsql-hackers
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?)

-- 
Alvaro Herrera                          Developer, http://www.PostgreSQL.org/
Essentially, you're proposing Kevlar shoes as a solution for the problem
that you want to walk around carrying a loaded gun aimed at your foot.
(Tom Lane)


pgsql-hackers by date:

Previous
From: Oleg Bartunov
Date:
Subject: Re: [PATCHES] a tsearch2 (8.2.4) dictionary that only filters out stopwords
Next
From: Andrew Dunstan
Date:
Subject: Re: psql -f doesn't complain about directories