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

Review DatabaseMetaData Table Types #778

Open
enqueue opened this issue Dec 13, 2021 · 0 comments
Open

Review DatabaseMetaData Table Types #778

enqueue opened this issue Dec 13, 2021 · 0 comments

Comments

@enqueue
Copy link
Contributor

enqueue commented Dec 13, 2021

Motivation

In ClickHouseDatabaseMetaData we currently differentiate between these table types: DICTIONARY, LOG TABLE, MEMORY TABLE, REMOTE TABLE, TABLE, VIEW, SYSTEM TABLE, TEMPORARY TABLE .

  • Are these distinctions useful to most ClickHouse JDBC users?
  • Is there any reference for the table types or is this supposed to be very vendor specific? I think we should not "invent" new stuff here.

What does the standard say?

  • I could not find any relevant hint in JDBC Spec 4.2 PDF
  • The API doc says:

Typical types are "TABLE", "VIEW", "SYSTEM TABLE", "GLOBAL TEMPORARY", "LOCAL TEMPORARY", "ALIAS", "SYNONYM".

What others are doing?

  • Postgresql: SYSTEM TABLE, SYSTEM VIEW, SYSTEM_INDEX, SYSTEM TOAST TABLE, SYSTEM TOAST INDEX, SYSTEM TEMPORARY TABLE, SYSTEM TEMPORARY INDEX, SYSTEM TEMPORARY SEQUENCE, SYSTEM TEMPORARY VIEW, TEMPORARY TABLE, TEMPORARY INDEX, TEMPORARY SEQUENCE, TEMPORARY VIEW, TABLE, PARTITIONED TABLE, INDEX, PARTITIONED INDEX, SEQUENCE, VIEW, TYPE, FOREIGN TABLE, MATERIALIZED VIEW
  • Firebird: SYSTEM TABLE, TABLE, VIEW, GLOBAL TEMPORARY
  • Mysql: LOCAL TEMPORARY, SYSTEM TABLE, SYSTEM VIEW, TABLE (alias VIEW, BASE TABLE)
  • Oracle ❓
  • SQL Server: VIEW, TABLE_TYPE ❓, TABLE, SYSTEM TABLE
  • H2: BASE TABLE, GLOBAL TEMPORARY, LOCAL TEMPORARY, SYNONYM, VIEW
  • Redshift: TABLE, VIEW, INDEX, SEQUENCE, TYPE, SYSTEM TABLE, SYSTEM TOAST TABLE, SYSTEM TOAST INDEX, SYSTEM VIEW, SYSTEM INDEX, TEMPORARY TABLE, TEMPORARY INDEX, TEMPORARY SEQUENCE, TEMPORARY VIEW, EXTERNAL TABLE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants