cartodb-postgresql icon indicating copy to clipboard operation
cartodb-postgresql copied to clipboard

Turn CDB_TableMetadata to a view

Open strk opened this issue 11 years ago • 4 comments

The real metadata should be in a table which is only readable by the superuser while the CDB_TableMetadata should be a view that only allows users to see records for tables they have select privileges on.

Would likely be affected by #21 (tagging tables as configuration tables). Might need to wait for 0.2, to do the change in a migration script.

strk avatar May 14 '14 10:05 strk

NOTE: moving the actual data into another table would require updating the DDL triggers to manipulate data in the real table

strk avatar May 22 '14 14:05 strk

I've a working version of this rename. The .sql script would create a "shadow" table and copy any pre-existing data there, then turn CDB_TableMetadata into a view. The "from unpackaged" script would copy again the data from "public" to "cartodb" schema.

strk avatar May 22 '14 14:05 strk

I've pushed the change in a new "TableMetadataView" branch, as it might be changed in a later release \cc @kartones

strk avatar May 22 '14 15:05 strk

NOTE: the change is one-way only, when using the lib/sql (direct) script loading as a way to upgrade/downgrade

strk avatar May 22 '14 15:05 strk