psql
中以\
开头的特殊命令的注释字符是什么?
以下似乎有效:
SELECT * FROM my_table -- this is my comment
但这不起作用:
\dt jvcurve_thin.jvcurve_results -- my comment #2
\dt: 忽略额外参数“--”
最佳答案
根据 PostgreSQL documentation , 既有内联式也有 block 式注释。
内联样式:
SELECT 23 AS test -- this is just a test
block 风格:
/* The following is a very
* non-trivial SQL code */
SELECT 42 AS result
关于postgresql - 我如何在 PostgreSQL psql 命令行工具中评论 special\commands?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4272251/