Hello Corey,
psql> \if :i >= 5I think we're ok with that so long as none of the operators or values has a \ in it. What barriers do you see to re-using the pgbench grammar?
The pgbench expression grammar mimics SQL expression grammar, on integers, floats, booleans & NULL. I'm unsure about some special cases in psql (`shell command`, 'text' "identifier"). They can be forbidden on a new commande (\let), but what happens on "\if ..." which I am afraid allows them is unclear. -- Fabien.