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

Add an option to show create table statement for postgre_fdw #5109

Closed
sunng87 opened this issue Dec 6, 2024 · 0 comments · Fixed by #5143
Closed

Add an option to show create table statement for postgre_fdw #5109

sunng87 opened this issue Dec 6, 2024 · 0 comments · Fixed by #5143
Assignees
Labels
C-enhancement Category Enhancements

Comments

@sunng87
Copy link
Member

sunng87 commented Dec 6, 2024

What type of enhancement is this?

API improvement

What does the enhancement do?

When using GreptimeDB tables in Postgres foreign data wrapper, it requires user to create a foreign table first. So user will need to:

  1. get column names of GreptimeDB
  2. get column types of GreptimeDB, that maps to Postgres types
CREATE FOREIGN TABLE ft_app_logs (
  ts TIMESTAMP,
  host VARCHAR,
  api_path VARCHAR,
  log_level VARCHAR,
  log VARCHAR
)
SERVER greptimedb
OPTIONS (table_name 'app_logs');

These steps can be tedious especially when user need to figure out mappings like double to double precision.

It can be helpful to offer an option to our show create table statement to dump this sql .

Implementation challenges

No response

@sunng87 sunng87 added the C-enhancement Category Enhancements label Dec 6, 2024
@sunng87 sunng87 self-assigned this Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category Enhancements
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant