Hello,
Because PostgreSQL is case sensitive when table and column names are quoted, I'd like dotConnect not to add quotes in generated request.
For exemple, I'd like :
select my_column from my_table
instead of :
select "my_column" from "my_table"
Regards,
Remove quote from generated request
-
- Devart Team
- Posts: 2420
- Joined: Wed 02 Nov 2011 09:44
Re: Remove quote from generated request
Could you please tell us which component, wizard or design editor has quoted your query?
Re: Remove quote from generated request
This is just a FYI: While capital letters, spaces, etc are not recommended in schema/table/field names, they are allowed and must be double quoted. If you do not double quote spaces, the SQL code will fail. If you do not double quote capital letters, Postgres automatically assumes it is lower case, which could either be correct or wrong depending on what was originally created within the Postgres Database.
Lloyd Albin
Seattle Postgres Users Group
www.seapug.org
Lloyd Albin
Seattle Postgres Users Group
www.seapug.org
Re: Remove quote from generated request
Hi,
By now, our application works on MSSQL, MySQL and Oracle. We need to add PostgreSQL.
To do that, we have generate an EDMX from an MSSQL database. Then, we only extract/use the SSDL part to support other database engines.
The CSDL and MSL parts contain UPPER CASE table and column names. As a result, the SQL generated by dotConnect also contains UPPER CASE table and column names. Because those names are quoted, the PostgreSQL servers says that the table doesn't exist. This works with other engines.
Regards,
By now, our application works on MSSQL, MySQL and Oracle. We need to add PostgreSQL.
To do that, we have generate an EDMX from an MSSQL database. Then, we only extract/use the SSDL part to support other database engines.
The CSDL and MSL parts contain UPPER CASE table and column names. As a result, the SQL generated by dotConnect also contains UPPER CASE table and column names. Because those names are quoted, the PostgreSQL servers says that the table doesn't exist. This works with other engines.
Regards,
Re: Remove quote from generated request
We recommend you to use the following option which disables quoting of all identifiers in all queries and commands:
For more information, refer to http://www.devart.com/dotconnect/postgr ... ation.html.
Code: Select all
PgSqlEntityProviderConfig config = PgSqlEntityProviderConfig.Instance;
config.Workarounds.DisableQuoting = true;