Re: psql -1 -f - busted
От | Robert Haas |
---|---|
Тема | Re: psql -1 -f - busted |
Дата | |
Msg-id | 603c8f070911261959k2eda96c0q49dea351af3cf80@mail.gmail.com обсуждение исходный текст |
Ответ на | psql -1 -f - busted (Stephen Frost <sfrost@snowman.net>) |
Ответы |
Re: psql -1 -f - busted
|
Список | pgsql-bugs |
On Thu, Oct 22, 2009 at 2:42 PM, Stephen Frost <sfrost@snowman.net> wrote: > =A0-1 appears to be ignored when '-f -' is set. I've been bitten by this, too. It appears that "-f -" is in general equivalent to not specifying "-f" at all. In startup.c we have a test for: options.action =3D=3D ACT_FILE && strcmp(options.action_string, "-") !=3D 0 I suppose we could change it to: options.action =3D=3D ACT_FILE && (strcmp(options.action_string, "-") !=3D 0 || pset.notty) But I sort of think it should just be: options.action =3D=3D ACT_FILE ISTM that if you run psql with "-f -", you shouldn't expect to get an interactive shell. Rather, you should expect psql to do whatever it normally does when given -f somefilename, except using stdin rather than the file. After all, you could have left out -f altogether if you'd wanted the interactive behavior. But then IJWH. ...Robert
В списке pgsql-bugs по дате отправления: