Oliver Elphick <[EMAIL PROTECTED]> writes: > It really isn't necessary to do that. If you are entering commands into > psql manually, either they are so few that you can easily repeat them, > using readline editing,
That's what I meant by feeling like I was typing a C program using "cat". > or you can write the commands as a script in an > external file, with BEGIN and END at its top and bottom, and run it with > \i /path/to/file. Sure you could do that. But it kind of defeats the purpose of having an interactive client. It feels like being transported back to the 70s. In any case neither of these solutions addresses the situation where any of the steps in the sequence of commands takes a long time to run. It's wasteful and simply silly to be reexecuting 5 minute queries over and over (nevermind hour long queries or day-long queries) because I typoed on the select to see if it worked the way I expected at the end. That's actually the usual time that I want to double check my work before committing, not simple quick queries. Or similarly for the situation of non-deterministic queries. Sometimes I use random() for loading sample data but then I want to check to make sure things were distributed the way I wanted... -- greg ---------------------------(end of broadcast)--------------------------- TIP 8: explain analyze is your friend