postgresql problem executing query with mixed case

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for PostgreSQL
Post Reply
jules3766
Posts: 7
Joined: Fri 25 Mar 2016 05:52

postgresql problem executing query with mixed case

Post by jules3766 » Sat 14 May 2016 16:22

Running Version 9.5
How do I deal with mixed case column names in your query writer? Queries are failing with the message that the lower case name of the mixed case field can not be found. Normally mixed case names are surrounded by quotes "TableName"."UpperCaseColumnName " to tell the server to look for mixed case.

Is there a setting somewhere? I have tried to put it into the sqlcode window and that does not work either.

alexa

Re: postgresql problem executing query with mixed case

Post by alexa » Mon 16 May 2016 13:07

Could you please provide us the full name and version of the product and describe this issue in more detail?

jules3766
Posts: 7
Joined: Fri 25 Mar 2016 05:52

Re: postgresql problem executing query with mixed case

Post by jules3766 » Mon 16 May 2016 15:54

dotConnect for PostgreSQL Professional Edition 7.5.639.0
Entity Framework, Devart LinqConnect Version 5.8.841
.....
In the query editor in a windows forms test Visual Studio 2015.
a simple query:
.....

SELECT utid, idxResID
FROM talog.tl_track

SQL Execution Error.
Executed SQL statement: SELECT utid idxREsID From talog.tl.track
Error Source: Devart.Data.PostgreSQL
Error Message: column "idxresid" does not exist.

If I run a query against a table that does not have Upper/Lower case it works.
PostgreSQL requires " " if a column or table name is mixed case.

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

Re: postgresql problem executing query with mixed case

Post by Shalex » Wed 18 May 2016 10:54

Give us an additional information:

1) the ORM framework you created model for: Entity Framework (*.edml), LinqConnect (*.lqml), or NHibernate (*.hbml)

2) have you encountered the issue with unquoted names in runtime (when running the code) or in design time (right click an entity on the diagram > Retrieve Data)?

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

Re: postgresql problem executing query with mixed case

Post by Shalex » Wed 18 May 2016 11:05

We have reproduced the error with Query Editor within Server Explorer. This is a known issue, and it is caused by Query Builder specific behavior when working with third-party provider via DDEX in Visual Studio. We are looking for the solution, but there is no any timeframe.

As a workaround, please drag&drop on your form (WinForms App) the PgSqlDataAdapter component to retrieve data in design time (this component also includes the "Quote identifiers" option when generating the update commands).

Post Reply