Hi,
Per viewtopic.php?f=3&t=1831 I now know when a schema was created, but how do I know who create it?
Who created a schema?
Moderator: NorbertKrupa
Who created a schema?
Have a GREAT day!
Re: Who created a schema?
Hi Sarah,
You have the documentation? In the same SCHEMATA table:
—Sharon
You have the documentation? In the same SCHEMATA table:
Code: Select all
SCHEMA_OWNER VARCHAR Name of the owner who created the schema
Sharon Cutter
Vertica Consultant, Zazz Technologies LLC
Vertica Consultant, Zazz Technologies LLC
Re: Who created a schema?
Ok, sorry. I was thinking if the schema owner was changed, how would I know who created it. But we can't change a schema owner, so I guess this is a none issue
Code: Select all
dbadmin=> create user sarah;
CREATE USER
dbadmin=> create schema sarah;
CREATE SCHEMA
dbadmin=> select schema_owner from schemata where schema_name = 'sarah';
schema_owner
--------------
dbadmin
(1 row)
dbadmin=> alter schema sarah owner to sarah;
ERROR 2676: Command ALTER SCHEMA is not supported
Have a GREAT day!
- JimKnicely
- Site Admin
- Posts: 1825
- Joined: Sat Jan 21, 2012 4:58 am
- Contact:
Re: Who created a schema?
That's not technically true when the "AUTHORIZATION" option is used on the CREATE SCHEMA commandSCHEMA_OWNER VARCHAR Name of the owner who created the schema
Code: Select all
dbadmin=> create user jim;
CREATE USER
dbadmin=> create schema cowboy authorization jim;
CREATE SCHEMA
dbadmin=> select schema_owner, create_time from schemata where schema_name = 'cowboy';
schema_owner | create_time
--------------+-------------------------------
jim | 2014-04-24 09:05:46.588581-04
(1 row)
Jim Knicely
Note: I work for Vertica. My views, opinions, and thoughts expressed here do not represent those of my employer.
Note: I work for Vertica. My views, opinions, and thoughts expressed here do not represent those of my employer.