I'd like something like this as well. It would necessarily have to be pretty limited. For instance, it would be difficult to support multi-line commands interactively. And UDF's would be out. But just having a way to test simple code fragments would be nice.

The piping solution might be better, as the code could be read in completely before execution started, so parsing could be done as with a script file.

New Mexico Mark