"Kevin T. Manley" <kmanley@qwest.net> writes:
> CREATE VIEW VW_FOO AS select pg_class.oid, relname from pg_class where
> relowner=27;
> fails with:
> Attribute 'oid' has a name conflict
> Name matches an existing system attribute
If you tried to create a table with a user column named 'oid' (or xmin
or any of the other system attribute names), you'd get the same error.
Views don't really have an oid column, but the system attribute names
are reserved anyway.
I'd recommend changing the name of the view's column, eg
SELECT pg_class.oid AS reloid, ...
regards, tom lane