Tom Lane <tgl@sss.pgh.pa.us> wrote:
> itagaki@postgresql.org (Takahiro Itagaki) writes:
> This syntax synopsis is completely nuts:
> DO { [ LANGUAGE lang_name ] | code } ...
>
> I think that it would be logically correct without the square brackets,
Oops, that's correct.
> but as a matter of clarity I really doubt it's an improvement over the
> original.
We cannot write down the accurate syntax with BNF, right? We can have
0..1 "LANGUAGE lang_name", but must have just 1 "code" in any order.
How about the following description?
DO [ LANGUAGE lang_name ] code
because the psql tab completion adds LANGUAGE just after DO.
Regards,
---
Takahiro Itagaki
NTT Open Source Software Center