dbeaver / dbeaver/dbeaver

Cannot find Temporary Table in metadata catalog causing SQL Editor failed to highlight temp table fields

Open
#23,069 4 comments 2 reactions 0 assignees View on GitHub
xf:sql parser
Dominant language
Java
Stars
51.8k
Forks
4.4k
Avg merge
3d 8h
Merged PRs (30d)
188

Description

### Description

It happened to PostgreSQL but not sure about other variants.
You can reproduce by running the simple query below:
```
drop table if exists test_temp;

create temporary table test_temp as
select
*
from
generate_series(
1,
10,
1
) as a;

select
a
from
test_temp;
```

The query runs fine and it will output the result. However, if we check the editor, it highlights all the `test_temp` fields:
image

By checking the log, it appears to have some issue when reading meta catelog:
`Table 'postgres.pg_temp_3.test_temp' not found in metadata catalog`

### DBeaver Version

Community Edition 24.0.0.202403031740

### Operating System

Windows 10

### Database and driver

- Database: PostgreSQL 16.2 (Debian 16.2-1.pgdg120+2)
- Driver: PostgreSQL JDBC Driver 42.7.2

### Steps to reproduce

- Create any temp table and write a `select `statement
- Check the syntax highlighting in SQL Editor

### Additional context

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.