Home
Options

Can LINQPad automatically quote DB object names for me?

I'd like to use LINQPad to query a PostgreSQL database (using the plugin developed by fknx). The database contains camel case names, which Postgres automatically folds to lowercase unless they're quoted. So this works:
SELECT "MyColumn" FROM "CamelCaseTable"
but this fails:
SELECT MyColumn FROM CamelCaseTable
Can LINQPad automatically quote column names, so that users don't have to? This already works in LINQ Expressions, e.g.
from c in CamelCaseTable select c.MyColumn
but it would be great if it worked without the quotes when the language is set to SQL, too.

Comments

  • Options
    This is up to whoever wrote the PostreSQL driver. However, it's arguably undesirable to insert quotes in the case of SQL queries. Part of the value of the SQL mode is that it executes exactly what you type. This means you can copy and paste the SQL into a program, and know that it will work.
  • Options
    Fair enough. I guess that means that LINQPad makes no attempt to parse the query. The driver doesn't, either (as far as I can see), which means that implementing this would be a serious undertaking.
Sign In or Register to comment.