From: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
---|---|
To: | David Fetter <david(at)fetter(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-15 02:49:18 |
Message-ID: | 20071115024918.GX19014@alvh.no-ip.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
David Fetter wrote:
> 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.
Interesting. Why not just use a standard shell pipe from the command
writing into the named pipe, instead of piping through it?
--
Alvaro Herrera http://www.flickr.com/photos/alvherre/
"Having your biases confirmed independently is how scientific progress is
made, and hence made our great society what it is today" (Mary Gardiner)
From | Date | Subject | |
---|---|---|---|
Next Message | Josh Berkus | 2007-11-15 02:57:18 | Re: Spinlock backoff algorithm |
Previous Message | David Fetter | 2007-11-15 01:52:51 | Re: psql -f doesn't complain about directories |