Remove quote from generated request

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for PostgreSQL
Post Reply
Tetranos
Posts: 4
Joined: Mon 29 Oct 2012 17:09

Remove quote from generated request

Post by 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,

Pinturiccio
Devart Team
Posts: 2420
Joined: Wed 02 Nov 2011 09:44

Re: Remove quote from generated request

Post by Pinturiccio » Thu 01 Nov 2012 13:16

Could you please tell us which component, wizard or design editor has quoted your query?

lalbin
Posts: 15
Joined: Thu 06 Aug 2009 23:29
Location: Seattle

Re: Remove quote from generated request

Post by 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

Tetranos
Posts: 4
Joined: Mon 29 Oct 2012 17:09

Re: Remove quote from generated request

Post by 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,

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: Remove quote from generated request

Post by 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/postgr ... ation.html.

Post Reply