Remove quote from generated request

Remove quote from generated request

Postby Tetranos » Mon 29 Oct 2012 17:13

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,
Tetranos
 
Posts: 4
Joined: Mon 29 Oct 2012 17:09

Re: Remove quote from generated request

Postby Pinturiccio » Thu 01 Nov 2012 13:16

Could you please tell us which component, wizard or design editor has quoted your query?
Pinturiccio
Devart Team
 
Posts: 1983
Joined: Wed 02 Nov 2011 09:44

Re: Remove quote from generated request

Postby lalbin » Thu 01 Nov 2012 22:48

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
lalbin
 
Posts: 13
Joined: Thu 06 Aug 2009 23:29
Location: Seattle

Re: Remove quote from generated request

Postby Tetranos » Wed 14 Nov 2012 16:23

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,
Tetranos
 
Posts: 4
Joined: Mon 29 Oct 2012 17:09

Re: Remove quote from generated request

Postby Shalex » Thu 15 Nov 2012 12:46

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/postgresql/docs/?EFProviderConfiguration.html.
Shalex
Devart Team
 
Posts: 7659
Joined: Thu 14 Aug 2008 12:44


Return to dotConnect for PostgreSQL