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

From David Fetter
Subject Re: psql -f doesn't complain about directories
Date
Msg-id 20071115015251.GZ28860@fetter.org
Whole thread Raw
In response to Re: psql -f doesn't complain about directories  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Responses Re: psql -f doesn't complain about directories  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
List pgsql-hackers
On Wed, Nov 14, 2007 at 05:15:20PM -0300, 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?)

Yes, I have seen people use just this technique.

Cheers,
David.
-- 
David Fetter <david@fetter.org> http://fetter.org/
Phone: +1 415 235 3778  AIM: dfetter666  Yahoo!: dfetter
Skype: davidfetter      XMPP: david.fetter@gmail.com

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate


pgsql-hackers by date:

Previous
From: "Jignesh K. Shah"
Date:
Subject: Re: LDC - Load Distributed Checkpoints with PG8.3b2 on Solaris
Next
From: Alvaro Herrera
Date:
Subject: Re: psql -f doesn't complain about directories