On Thu, Oct 22, 2009 at 2:42 PM, Stephen Frost <sfr...@snowman.net> wrote: > -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 == ACT_FILE && strcmp(options.action_string, "-") != 0 I suppose we could change it to: options.action == ACT_FILE && (strcmp(options.action_string, "-") != 0 || pset.notty) But I sort of think it should just be: options.action == 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 -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs