diff --git a/packages/browser-tests/questdb b/packages/browser-tests/questdb index 8b2df2ba3..550f13627 160000 --- a/packages/browser-tests/questdb +++ b/packages/browser-tests/questdb @@ -1 +1 @@ -Subproject commit 8b2df2ba31ff20d86c3e2b9d71fa874972028729 +Subproject commit 550f1362790c0502d54193573c8a0dc1a85c6670 diff --git a/packages/web-console/src/scenes/Schema/index.tsx b/packages/web-console/src/scenes/Schema/index.tsx index 7f600bc63..ce72ee77a 100644 --- a/packages/web-console/src/scenes/Schema/index.tsx +++ b/packages/web-console/src/scenes/Schema/index.tsx @@ -196,21 +196,29 @@ const Schema = ({ } const fetchColumns = async () => { - try { - const response = await quest.query( - "information_schema.columns()", - ) - if (response && response && response.type === QuestDB.Type.DQL) { - setColumns(response.data) - dispatch(actions.query.setColumns(response.data)) + const queries = [ + "information_schema.questdb_columns()", + "information_schema.columns()" // fallback for older servers + ] + + for (const query of queries) { + try { + const response = await quest.query(query) + + if (response?.type === QuestDB.Type.DQL) { + setColumns(response.data) + dispatch(actions.query.setColumns(response.data)) + return + } + } catch { + // let's try another query } - } catch (error) { - dispatchState({ - view: View.error, - }) } + + dispatchState({ view: View.error }) } + const copySchemasToClipboard = async () => { if (!tables) return let tablesWithError: string[] = []