Page 1 of 1

Remove quote from generated request

Posted: Mon 29 Oct 2012 17:13
by Tetranos
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,

Re: Remove quote from generated request

Posted: Thu 01 Nov 2012 13:16
by Pinturiccio
Could you please tell us which component, wizard or design editor has quoted your query?

Re: Remove quote from generated request

Posted: Thu 01 Nov 2012 22:48
by lalbin
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

Re: Remove quote from generated request

Posted: Wed 14 Nov 2012 16:23
by Tetranos
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,

Re: Remove quote from generated request

Posted: Thu 15 Nov 2012 12:46
by Shalex
We recommend you to use the following option which disables quoting of all identifiers in all queries and commands:

Code: Select all

PgSqlEntityProviderConfig config = PgSqlEntityProviderConfig.Instance;  
config.Workarounds.DisableQuoting = true; 
For more information, refer to http://www.devart.com/dotconnect/postgr ... ation.html.