https://kotlinlang.org logo
#server
Title
# server
a

Andrea Alberti

03/26/2024, 1:30 PM
#ktor #exposed #dls Function selectAll() create a sql query with name column quote . Ex. Products.selectAll() SELECT PRODUCTS.ID, PRODUCTS."NAME" FROM PRODUCTS "NAME" quotes are error.
l

Leonardo Silveira

03/26/2024, 1:33 PM
name might be a reserved word in the dialect therefore the quotes. those quotes are perfectly legal SQL
a

Andrea Alberti

03/26/2024, 1:34 PM
Postgresql use name as reserved word?
l

Leonardo Silveira

03/26/2024, 1:38 PM
looks like it is reserved but in postgresql dialect it is not: https://www.postgresql.org/docs/current/sql-keywords-appendix.html so, someone decided to quote reserved SQL keywords. but would that query end up in error because the quotes? unlikely.
3 Views