RPostgres icon indicating copy to clipboard operation
RPostgres copied to clipboard

feat: `dbListTables()` lists materialized views

Open dpprdan opened this issue 2 years ago • 3 comments

This PR extends #413 and adds the queries of the system catalogs in order for dbList*() and dbExistsTable() to return information about materialized views in PostgreSQL. For background see #413 and #251.

In order to make the use of the system catalogs vis-a-vis information_schema.tables optional, I added a system_catalogs argument to dbConnect() (as suggested in #261). I set the default to TRUE (i.e. for regular PqConnections).

Redshift connections do not have the (explicit) argument, because there is (probably) no necessary extra information in it's system catalog views (i.e. above what's in information_schema). Since Redshift connections inherit from PqConnection, system_catalogs is set to FALSE for them.

I've added tests for materialized views, i.e. whether dbList*() and dbExistsTable() return information about matviews on the search path and on a custom schema.

closes #251

dpprdan avatar Dec 15 '22 20:12 dpprdan

This now has conflicts.

krlmlr avatar Mar 16 '23 05:03 krlmlr

Current Aviator status

Aviator will automatically update this comment as the status of the PR changes. Comment /aviator refresh to force Aviator to re-examine your PR (or learn about other /aviator commands).

This pull request is currently open (not queued).

How to merge

To merge this PR, comment /aviator merge or add the mergequeue label.


See the real-time status of this PR on the Aviator webapp.
Use the Aviator Chrome Extension to see the status of your PR within GitHub.

aviator-app[bot] avatar Nov 09 '23 11:11 aviator-app[bot]

Thanks. I now disentangled and merged most preparatory PRs. Should we take another stab here?

🥳 I'll look into it, but again, it might take a couple of days until I'll get around to it.

dpprdan avatar Apr 03 '24 19:04 dpprdan