"Gurjeet Singh" <singh(dot)gurjeet(at)gmail(dot)com> writes:
> I know the ERROR seems obvious, but then if we allow zero-column tables,
> then why not zero-column views?
> Or should the question be, why do we allow zero-column tables?
Neither one is legal per the SQL spec. We allow zero-column tables
because otherwise there are unpleasant corner cases for ALTER TABLE DROP
COLUMN, ie, you couldn't drop the last remaining column before adding
another. But since we don't have ALTER VIEW DROP COLUMN, there's no
comparable argument for violating the spec for views.
regards, tom lane