dbeaver / dbeaver

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

Column name changed to lowercase when created from UI #34326

Open FKPSC opened 5 months ago

FKPSC commented 5 months ago

Description

When creating a new column for a table in postgres that contains uppercase letters, it is changed to lowercase afterwards. image then image I assume there are some quotes missing somewhere internally (https://stackoverflow.com/questions/20878932/are-postgresql-column-names-case-sensitive).

DBeaver Version

CE Version 24.1.0.202406021658

Operating System

Pop!_OS 22.04 LTS x86_64

Database and driver

PostgreSQL 15.7 PostgreSQL JDBC Driver Postgresql 42.7.2

Steps to reproduce

  1. go to table
  2. create new column with name containing uppercase letters

Additional context

No response

LonwoLonwo commented 5 months ago

Hello @FKPSC

By default, DBeaver uses the case of a database. You need to add quotes around a name. Or enable this setting in Preferences to keep your original case:

image

FKPSC commented 4 months ago

Idea for improvement:

  1. Check for mixed cases in table names in such cases
  2. Prompt once (or with a don't display this again checkbox) to turn this setting on

This is a cheap check. If no mixed cases are used, nothing is shown. If mixed cases are used, prompt the user in case it is intentional.

Just my 2 cents :)

E1izabeth commented 4 months ago

Thank you for idea. I change the label from bug to enhancement

E1izabeth commented 3 months ago

We want to add quotes for names filled in the text field for any object - table, column, procedure, etc.