dbeaver / dbeaver

Free universal database tool and SQL client
https://dbeaver.io
Apache License 2.0
40.71k stars 3.51k forks source link

Autocomplete stops working after use of double quotes in string #23228

Open ma3xdev opened 8 months ago

ma3xdev commented 8 months ago

Description

Hello and sorry to open this issue again, but I think I found a specific bug related to autocomplete: While I wrote the following query, autocomplete always worked great:

SELECT
    prod.codice AS "ID",
    mag.sku AS "EAN",
    upper(TRANSLATE(prod.codiceproduttore, '\/:*?<>|-_ .', '')) AS "CODICE BONIFICATO",
    marca.nomeit AS "MARCA",
    genere.nomeit AS "SESSO",
    cat.pathnomeit AS "CATEGORIA"
FROM prodotto AS prod
    INNER JOIN magazzino AS mag ON (mag.prodotto_id = prod.id)
    INNER JOIN marca ON (marca.id = prodotto.marca_id)
    INNER JOIN genere ON (genere.id = prodotto.genere_id)
    INNER JOIN categoria AS cat ON (cat.id = prod.categoria3_id)
WHERE prod.codiceproduttore <> ''
ORDER BY prod.id, mag.id
;

But, if I change the line with the translate, adding a double quote in the string to translate (which is what I'd like to have, as it is allowed in the SQL language), from

upper(TRANSLATE(prod.codiceproduttore, '\/:*?<>|-_ .', '')) AS "CODICE BONIFICATO",

to

upper(TRANSLATE(prod.codiceproduttore, '\/:*?"<>|-_ .', '')) AS "CODICE BONIFICATO",

then the autocomplete stops working from the line following that line. Screenshot 2024-03-25 at 15 29 26

DBeaver Version

Community Edition 24.0.1.202403241413

Operating System

macOS Catalina (10.15.7)

Database and driver

  1. Database name and version: PostgreSQL 14.5
  2. Driver name and version: PostgreSQL JDBC Driver 42.7.2

Steps to reproduce

  1. connect to the database
  2. write a simple query with the function translate(field, '\/:.')
  3. try to autocomplete another field on the next line ➝ it works
  4. change the string inside the translate, adding a double quote translate(field, '\/":.')
  5. try to autocomplete another field on the next line ➝ it doesn't work (no proposal popup)

Additional context

No response

Destrolaric commented 8 months ago

Thank you for your report.

ma3xdev commented 3 months ago

Hello, any news about this issue? Thank you

E1izabeth commented 3 months ago

We haven't implemented it yet