Repository navigation
Show the user objects in the catalog tables - #178
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #3.
The catalog tables now show the objects that a user makes. Before this change
pg_classand the other catalogs showed only the built-in rows, so a client could not see a new schema, table, index or sequence.What changes
pg_namespace,pg_class,pg_type,pg_attribute,pg_attrdef,pg_constraint,pg_index,pg_sequenceandpg_dependadds the rows of the session catalog after the built-in rows. The new modulerupg-exec/src/user.rsmakes these rows. TheSessiontrait ofrupg-funcgives the catalog to the executor.CREATE TABLEnow makes the TOAST tablepg_toast.pg_toast_Nand its index, with the same OIDs, columns, operator classes andpg_dependrows as PostgreSQL. The TOAST table holds no data.pg_classhasrelhastriggersandreltoastrelid. A foreign key setsrelhastriggerson the two tables. It does not make the triggers yet, sopg_triggerhas no rows for them.connoinheritset, as in PostgreSQL. An index column copiesattndimsfrom its table column.CREATE INDEXon a TOAST table gives42501, and a foreign key to a TOAST table gives42809, with the messages of PostgreSQL.xidandcidhave text input.xideqint4andxidneqint4work, sorelfrozenxid = 0works.The columns of type
pg_node_tree(adbin,conbin,indexprsandindpred) hold the analyzer form of the expression, not the PostgreSQL node text.pg_get_exprand the other deparse functions come in the next PR.Test
pg_node_treecolumns are compared asIS NOT NULL, andpg_dependleaves out the rows of the foreign key triggers.pg_dependrows.xidcomparisons in the executor test use the results of the oracle.