Harshini R
Harshini R

Reputation: 1

Postgres spring jpa column with uppercase error

My POSTGRESQL table column in Uppercase and in entity i mentioned colume name with uppercase using @column but it gives error as column doesnt exists ? Posgress doesn't support @column with uppercase value

Upvotes: 0

Views: 1314

Answers (2)

Shyam Patel
Shyam Patel

Reputation: 419

Identifiers (including column names) that are not double-quoted are folded to lowercase in PostgreSQL. Column names that were created with double-quotes and thereby retained uppercase letters (and/or other syntax violations) have to be double-quoted for the rest of their life:

"first_Name"

Values (string literals / constants) are enclosed in single quotes:

'xyz'

You can also check this documentation

I hope, it helps!

Upvotes: 0

Grim
Grim

Reputation: 1976

Try to use

@Column(name="`MYUPCASECOLUMN`")

Important is the `-charcter.

Upvotes: 1

Related Questions