Closed afig closed 6 years ago
An alternative is to define listTables
and describe in the ClassDB
schema and giving everyone the right to execute these functions (though they may be executed as ClassDB
).
A disadvantage to the proposed alternative is that students new to DBMSs need to schema-qualify when calling these functions (ClassDB.listTables()
), but I don't see an issue with that: This function exists so students new to RDBMS don't need to know information schema and that they will type in exactly what is shown in an example.
Based on our discussion yesterday, I have pushed a branch, remove-foldpgid-dup
, that addresses some of the code duplication in this issue. listTables()
now only works in the current user's schema, and the first version of Describe()
class ClassDB.foldPgID()
.
I have not yet touched the override of Describe()
that can be supplied a schema parameter, because giving it to ClassDB would allow students to access other schemas. I am wondering if we should remove this version completely, or grant it only to instructors.
I have also created a new wiki page for listing actions the M1->M2 migration script will need to preform. For example, it will need to drop Public.Describe(VARCHAR(63))
, since Public.Describe()
no longer takes a parameter.
Code that replicates Postgres's folding behavior is duplicated in
listTables
anddescribe
(twice indescribe
). This same code is also found infoldPgID
, howeverfoldPgID
cannot be used in these two functions due tofoldPgID
being located in theclassdb
schema, which is inaccessible to users who are not Instructors or DBManagers.