Is there an easy way to add the schema to the following query:
SELECT u.usename FROM pg_class c, pg_user u WHERE u.usesysid = c.relowner AND relname = ?
Thank you.
>Is there an easy way to add the schema to the following query:
You mean like this? SELECT u.usename, n.nspname AS schema FROM pg_class c JOIN pg_namespace n ON n.oid = c.relnamespace, pg_user u WHERE u.usesysid = c.relowner AND relname = ?
OR do you mean like this? SELECT u.usename FROM pg_class c JOIN pg_namespace n ON n.oid = c.relnamespace, pg_user u WHERE u.usesysid = c.relowner AND relname = ? AND n.nspname = 'public'