observablehq / feedback

Customer submitted bugs and feature requests
42 stars 3 forks source link

db.describe for multi-schema database should have a way to choose different schema #337

Open tx0c opened 2 years ago

tx0c commented 2 years ago

Describe the bug current Obhq seems only support PostgreSQL's default public schema, but for multi-schema database, it says Not found

To Reproduce Steps to reproduce the behavior:

  1. Connect a PostgreSQL which has multi-schema database
  2. run db.sqlSELECT * FROM schema2.table2 is okay, but trying to call db.describe("schema2.table2") failed with Not found, tried db.describe('schema2', 'table2') neither works

Expected behavior db.describe should support multi-schema database

Screenshots image

CobusT commented 2 years ago

Curious... what happens when you just say db.describe("table2")

tx0c commented 2 years ago

that works for a uniquely named table name, but not work for same table name from different schema

this should be a Bug not feature request

CobusT commented 2 years ago

Thanks for confirming. The reason I marked this as a feature request is that db.describe does not currently support using schemas. So this is a new feature we need to add to the describe function. We may need to add the schema as a second argument to the describe function.