|
1 | 1 | # CrateDB <-> Metabase backlog
|
2 | 2 |
|
3 | 3 |
|
| 4 | +## metabase/metabase:v0.48.4 |
| 5 | +Starts tripping with a hard error. |
| 6 | +``` |
| 7 | +metabase | 2024-11-23 16:34:33,843 WARN sync.util :: Error in sync step Sync postgres Database 2 'cratedb-testdrive' |
| 8 | +metabase | org.postgresql.util.PSQLException: ERROR: line 5:20: no viable alternative at input 'select\n NULL as role,\n t.schemaname as schema,\n t.objectname as table' |
| 9 | +``` |
| 10 | +```sql |
| 11 | +with table_privileges as ( |
| 12 | + select |
| 13 | + NULL as role, |
| 14 | + t.schemaname as schema, |
| 15 | + t.objectname as table, |
| 16 | + pg_catalog.has_table_privilege(current_user, '"' || t.schemaname || '"' || '.' || '"' || t.objectname || '"', 'UPDATE') as update, |
| 17 | + pg_catalog.has_table_privilege(current_user, '"' || t.schemaname || '"' || '.' || '"' || t.objectname || '"', 'SELECT') as select, |
| 18 | + pg_catalog.has_table_privilege(current_user, '"' || t.schemaname || '"' || '.' || '"' || t.objectname || '"', 'INSERT') as insert, |
| 19 | + pg_catalog.has_table_privilege(current_user, '"' || t.schemaname || '"' || '.' || '"' || t.objectname || '"', 'DELETE') as delete |
| 20 | + from ( |
| 21 | + select schemaname, tablename as objectname from pg_catalog.pg_tables |
| 22 | + union |
| 23 | + select schemaname, viewname as objectname from pg_catalog.pg_views |
| 24 | + union |
| 25 | + select schemaname, matviewname as objectname from pg_catalog.pg_matviews |
| 26 | + ) t |
| 27 | + where t.schemaname !~ '^pg_' |
| 28 | + and t.schemaname <> 'information_schema' |
| 29 | + and pg_catalog.has_schema_privilege(current_user, t.schemaname, 'USAGE') |
| 30 | +) |
| 31 | +select t.* |
| 32 | +from table_privileges t; |
| 33 | +``` |
| 34 | +``` |
| 35 | +SQLParseException[line 5:17: no viable alternative at input 'select\nNULL as role,\nt.schemaname as schema,\nt.objectname as table'] |
| 36 | +``` |
| 37 | + |
| 38 | + |
4 | 39 | ## metabase/metabase:v0.45.4.3
|
5 | 40 |
|
6 | 41 | ```
|
|
0 commit comments