Re: RFD: schemas and different kinds of Postgres objects
От | Fernando Nasser |
---|---|
Тема | Re: RFD: schemas and different kinds of Postgres objects |
Дата | |
Msg-id | 3C4DCBDB.689D7201@redhat.com обсуждение исходный текст |
Ответ на | Re: RFD: schemas and different kinds of Postgres objects (Peter Eisentraut <peter_e@gmx.net>) |
Ответы |
Re: RFD: schemas and different kinds of Postgres objects
|
Список | pgsql-hackers |
OK, so the proposal is that we dissociate the ownership from the namespace when we implement our version of SQL-Schemas, right? This way an object will have both an owner and a schema (while in the standard they are the same thing). The important is not much to accommodate someone who is creating schemas (a new thing, so objects can be created the "right" way) but rather to accommodate current code that does not use schemas and have several owners for the objects (which would all fall into a "default" schema). Can you agree with that? I was looking to see if we choose the proper defaults and search paths and the "default" schema we could make it look for SQL-compliant code as if it was a vanilla SQL-Schemas implementation. To support the current database schema definitions (without SQL-Schemas and with different owners), things would be created with the current user authorization id and will have its name defined in the "default" SQL-Schema namespace. Also, when referring to an object if the name is not qualified with the schema name, the search would go through the schema with the current authorization id (as required by the std) and proceed to check the "default" schema. The only problem in the scenario above is that the standard says that when creating objects and not specifying the schema the schema name should be assumed to be the current user authorization id (or whatever authorization id the code is running as). In our case it would go to the default schema. If someone wants the SQL std behavior then, he/she must create things inside a CREATE SCHEMA statement or explicitly qualify with the schema name the objects being created. Can we live with that? Will we pass the conformance tests? (I saw tests that test the schema name that is assumed when referencing but I do not recall seeing one that tests what is assumed on creation -- things I saw were all created inside CREATE SCHEMA statements. Note, also, that passing the NIST tests doesn't make us compliant if we know that we are doing something different than what is specified -- it just means that we got away with it :-) -- Fernando Nasser Red Hat Canada Ltd. E-Mail: fnasser@redhat.com 2323 Yonge Street, Suite #300 Toronto, Ontario M4P 2C9
В списке pgsql-hackers по дате отправления: