Tom Lane escribió:
> What I'm thinking about this today is that really the *right* solution
> is to allow syntactically-empty SELECT lists; once we've bought into the
> notion of zero-column tables, the notion that you can't have an empty
> select list is just fundamentally at odds with that. And since you can
> already have semantically-empty SELECT lists, this should in theory not
> create much risk of new bugs. If we did that, the existing ruleutils
> code is just fine, as are any existing dump files containing this sort
> of query.
Wow, as strange-sounding as that is, you're probably correct.
This might probably be seen as a deviation from the standard, but then
so are zero-column tables. Of course, syntactically-empty select lists
would also work with (standard-conforming) tables containing columns,
but it's hard to see that that would be a problem in practice.
> That change might still be thought too aggressive for a back-patch,
> though. Comments?
Well, no correct query will start failing due to this change; the only
visible change would be queries that previously throw errors would start
working. It's hard to see that as a backward-incompatibility.
--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services