Fixed a reflection bug where table comments could only be retrieved for
tables actually owned by the user but not for tables visible to the user
but owned by someone else. Pull request courtesy Dave Hirschfeld.
Fixes: #5146
Closes: #5147
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/5147
Pull-request-sha:
0651e3bed05923765203b37986a2506dac3e634e
Change-Id: If970fda10d6adf04d926d38df1a567df1de9f7b9
(cherry picked from commit
0c294d356f7cbb22a8da3fc4552a9c4232c3f69a)
--- /dev/null
+.. change::
+ :tags: bug, oracle
+ :tickets: 5146
+
+ Fixed a reflection bug where table comments could only be retrieved for
+ tables actually owned by the user but not for tables visible to the user
+ but owned by someone else. Pull request courtesy Dave Hirschfeld.
COMMENT_SQL = """
SELECT comments
- FROM user_tab_comments
+ FROM all_tab_comments
WHERE table_name = :table_name
"""
data varchar2(50)
);
+COMMENT ON TABLE %(test_schema)s.parent IS 'my table comment';
+
create table %(test_schema)s.child(
id integer primary key,
data varchar2(50),
parent.join(child)
).execute().fetchall()
+ # check table comment (#5146)
+ eq_(parent.comment, "my table comment")
+
def test_reflect_local_to_remote(self):
testing.db.execute(
"CREATE TABLE localtable (id INTEGER "