Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create query to list available tables in a remote server #3923

Closed
Tracked by #3920
FelixMalfait opened this issue Feb 13, 2024 · 0 comments
Closed
Tracked by #3920

Create query to list available tables in a remote server #3923

FelixMalfait opened this issue Feb 13, 2024 · 0 comments
Labels
scope: backend Issues that are affecting the backend side only

Comments

@FelixMalfait
Copy link
Member

Context

Once we have completed #3922 and the user is able to connect a server, the next step is to be able to let them view the tables that they will be able to import.

Implementation

We should create a query remoteServerTables.

From ChatGPT, here's the query to retrieve all the available tables for a given server

SELECT ft.table_name, fs.foreign_server_name
FROM information_schema.foreign_tables AS ft
JOIN pg_foreign_server AS fs ON ft.foreign_server_catalog = fs.srvname
WHERE fs.srvname = 'your_foreign_server_name';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: backend Issues that are affecting the backend side only
Projects
None yet
Development

No branches or pull requests

1 participant