Double quotation bug when completing certain columns (just PostgreSQL?)
- Dominant language
- Java
- Stars
- 3.1k
- Forks
- 935
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 17
Description
### Apache NetBeans version
Apache NetBeans 23
### What happened


_One_ was added to the database as _"One"_
When I try to auto-complete a column that was added with double quotes to the database double quotes are inserted twice. I would have expected the auto-completion to only insert the double quotes once.
### Language / Project Type / NetBeans Component
NetBeans SQL Editor
### How to reproduce
1. Add a column to your (PostgresSQL) database with double quotes in it's name or use an existing one
1. Create a select statement without a selection of a column
1. Type two double quotes in the SQL editor window after SELECT
1. Open the auto-complete window (CRTL + SPACE)
1. Select the column in the auto complete window and hit RETURN or CRTL + RETURN
### Did this work correctly in an earlier version?
No / Don't know
### Operating System
Linux version 6.11.2-4-MANJARO
### JDK
OpenJDK 22.0.2
### Apache NetBeans packaging
Apache NetBeans binary zip
### Anything else
This bug already exists in earlier NetBeans version in combination with earlier PostgresSQL versions and different Linux-based operating systems.
Background knowledge on quoting columns:
> Quoting an identifier also makes it case-sensitive, whereas unquoted names are always folded to lower case. For example, the identifiers FOO, foo, and "foo" are considered the same by PostgreSQL, but "Foo" and "FOO" are different from these three and each other. (The folding of unquoted names to lower case in PostgreSQL is incompatible with the SQL standard, which says that unquoted names should be folded to upper case. Thus, foo should be equivalent to "FOO" not "foo" according to the standard. If you want to write portable applications you are advised to always quote a particular name or never quote it.)
https://www.postgresql.org/docs/current/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS
### Are you willing to submit a pull request?
No
Contributor guide
Research direction
Start in the NetBeans SQL Editor autocomplete flow and reproduce the issue with a PostgreSQL column whose name is double-quoted. Compare completion behavior for quoted identifiers and confirm the fix by repeating the reported steps; done means selecting the column inserts the quotes only once.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, postgresql, sql
- Domain
- database
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 42/100