My question is this:
Why do some postgresql functions require an empty bracket and others don't and how can I tell the correct syntax?
This does not work
ERROR: column "pg_postmaster_start_time" does not exist
LINE 1: select pg_postmaster_start_time;
However this works:
Now for the converse case: This works
and it results in
But this does not work
ERROR: syntax error at or near "("
LINE 1: select current_user();
I did find this has been asked here, but there didn't seem to be an answer
Read docs - it says
Note: current_catalog, current_schema, current_user, session_user, and user have special syntactic status in SQL: they must be called without trailing parentheses. (In PostgreSQL, parentheses can optionally be used with current_schema, but not with the others.)
I know it sounds like "because it says so", so does not actually answer your question. But this is how docs explain it.