On Fri, Jul 26, 2013 at 6:28 PM, Tom Lane <tgl@xxxxxxxxxxxxx> wrote:
Since SET is more or less a keyword in this context and there's already not some obvious things about it, it might be better to avoid using it with a slightly different meaning in the error messages. Maybe "defined" would be clearer? That would be consistent with your usage of "define" in the first error message as well.
ERROR: option "use_remote_estimate" has not been defined
HINT: Use ADD not SET to define an option that wasn't already defined.
ERROR: option "use_remote_estimate" is already defined
HINT: Use SET not ADD to change an option's value.
Just a thought.
<snip>
I think we could do with both more documentation, and better error
messages for these cases. In the SET-where-you-should-use-ADD case,
perhaps
ERROR: option "use_remote_estimate" has not been set
HINT: Use ADD not SET to define an option that wasn't already set.
In the ADD-where-you-should-use-SET case, perhaps
ERROR: option "use_remote_estimate" is already set
HINT: Use SET not ADD to change an option's value.
<snip>
Thoughts, better wordings?
Since SET is more or less a keyword in this context and there's already not some obvious things about it, it might be better to avoid using it with a slightly different meaning in the error messages. Maybe "defined" would be clearer? That would be consistent with your usage of "define" in the first error message as well.
ERROR: option "use_remote_estimate" has not been defined
HINT: Use ADD not SET to define an option that wasn't already defined.
ERROR: option "use_remote_estimate" is already defined
HINT: Use SET not ADD to change an option's value.
Just a thought.