What\'s the character for comments in postgres?
SELECT * FROM my_table # pound sign produces a syntax error
Thank you cababunga, the f
From the official documentation: PostgreSQL Comments.
A comment is a sequence of characters beginning with double dashes and extending to the end of the line, e.g.:
-- This is a standard SQL commentAlternatively, C-style block comments can be used:
/* multiline comment * with nesting: /* nested block comment */ */where the comment begins with /* and extends to the matching occurrence of */. These block comments nest, as specified in the SQL standard but unlike C, so that one can comment out larger blocks of code that might contain existing block comments.
A comment is removed from the input stream before further syntax analysis and is effectively replaced by whitespace.
And it has been supported the same way ever since dark ages (version 7.0).