Skip to content

Instantly share code, notes, and snippets.

@xiocode
Last active September 25, 2017 10:24
Show Gist options
  • Save xiocode/449416f5dadb8e09adbce452fe0d9bcf to your computer and use it in GitHub Desktop.
Save xiocode/449416f5dadb8e09adbce452fe0d9bcf to your computer and use it in GitHub Desktop.
@xiocode
Copy link
Author

xiocode commented Sep 25, 2017

  • 直接命令行运行 SQL
psql -c "SELECT current_time"
  • 命令行执行文件
psql -f  test.sql
  • 组合在一起
psql -c "SELECT current_time" –f examples.sql -c "SELECT current_time"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment