I am sending a initial implementation of psql content commands. This design is reaction to Tom's objections against psql file ref variables. This design is more cleaner, more explicit and more practical - import can be in one step.
Now supported commands are:
r - read file without any modification
rq - read file, escape as literal and use outer quotes
This patch is demo of this design - one part is redundant - I'll clean it in next iteration.
Regards
here is cleaned patch
* the behave is much more psqlish - show error only when the command is exactly detected - errors are related to processed files only - the behave is similar to psql variables - we doesn't raise a error, when the variable doesn't exists.