I have this simple view definition:
CREATE TEMP VIEW user_schema AS
SELECT nspname AS name FROM pg_namespace
WHERE nspname = 'public' OR nspowner = ‘rolename'::regrole;
But it fails to create the view by complaining: constant of the type "regrole"
cannot be used here
If I run the query directly, I get the correct result.
Does that mean I can’t compare role name this way in view? Should I use join to
work around it?
Thanks.
--
Sent via pgsql-general mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general