Re: psql -f doesn't complain about directories
От | Alvaro Herrera |
---|---|
Тема | Re: psql -f doesn't complain about directories |
Дата | |
Msg-id | 20071115024918.GX19014@alvh.no-ip.org обсуждение исходный текст |
Ответ на | Re: psql -f doesn't complain about directories (David Fetter <david@fetter.org>) |
Список | 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)
В списке pgsql-hackers по дате отправления: