> We would need an extra keyword if there were some third kind of > iteration that was fundamentally different from either of these, but > like I said, I don't see a plausible candidate. So right at the moment, > I'm leaning to the position that we could do without the ARRAY keyword > in FOREACH. If we do think of something else that could need its own > keyword there, it's arguably going to be different enough that a > different leading keyword would be a better idea anyhow. >
Maybe I propage a higher verbosity than is necessary, but it descrease a risk so code will do some unexpected work. With ARRAY keyword we can verify so result of expression is really a array. Next advantage is a clean implementation now and in future. Without a auxilary keyword is necessary to wait on execution time. So now, when we have full control over syntax, we can protect self before "FOR" statement implementation's complexity. Personally - syntax without ARRAY keyword isn't significant problem for me. Just I think so using it wisely. Second semi argument for using ARRAY keyword is a verbosity of PL/pgSQL. So from this perspective a ARRAY should be minimally optional and ensure, so expr result will be really a array. But with a optional ARRAY keyword we leaving a simple enhancing in future (on parser level). Pavel > regards, tom lane > -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers