SQLCell icon indicating copy to clipboard operation
SQLCell copied to clipboard

some psql commands, such as \COPY, aren't working.

Open tmthyjames opened this issue 9 years ago • 2 comments

tmthyjames avatar Nov 15 '16 21:11 tmthyjames

commands like \COPY are resolved by:

output = subprocess.check_output(pg)
if '<table border=' not in output:
    return output

commands like \connect are resolved by passing multiple commands separated by the -c option:

psql database -c "\connect some_database" -c "select * from table limit 10;"

See this.

tmthyjames avatar Nov 15 '16 21:11 tmthyjames

Not closing just yet. Will test other commands.

tmthyjames avatar Nov 15 '16 21:11 tmthyjames