npgsql/Npgsql — pull request #272 by Emill (2014-07-11 01:16:39+00:00)
Title: Remove redundancy in Entity Framework SQL generation for aliases and boolean casts

Hi. I did some quick optimizations that I should have noticed before.

Removed alias of a column name when the alias is the same as the original name.

SELECT
"Table"."ColumnName1" AS "ColumnName1",
"Table"."ColumnName2" AS "SomeOtherName"
FROM ...

is now written as

SELECT
"Table"."ColumnName1",
"Table"."ColumnName2" AS "SomeOtherName"
FROM ...

Removed unnecessary cast of literal booleans to booleans.

cast(TRUE as boolean)
cast(FALSE as boolean)

is now written as

TRUE
FALSE