[KDb] [Bug 387798] Referencing column aliases in SELECT and WHERE does not work in PostgreSQL

2017-12-11 Thread Jarosław Staniek
https://bugs.kde.org/show_bug.cgi?id=387798 --- Comment #4 from Jarosław Staniek --- Dev info for the record in KDb 9f68694395b (master): in selectStatementInternal() we are kind of using the SOLUTION #2, see the code where s_where_sub is set (it is computed without aliases).

[KDb] [Bug 387798] Referencing column aliases in SELECT and WHERE does not work in PostgreSQL

2017-12-11 Thread Jarosław Staniek
https://bugs.kde.org/show_bug.cgi?id=387798 --- Comment #3 from Jarosław Staniek --- > How about being standards compliant, and generating valid SQL? No implementation is compliant, as someone noted in the stackoverflow thread even PostgreSQL has deviations for convenience of

[KDb] [Bug 387798] Referencing column aliases in SELECT and WHERE does not work in PostgreSQL

2017-12-11 Thread Adam Pigg
https://bugs.kde.org/show_bug.cgi?id=387798 Adam Pigg changed: What|Removed |Added CC||a...@piggz.co.uk --- Comment #2

[KDb] [Bug 387798] Referencing column aliases in SELECT and WHERE does not work in PostgreSQL

2017-12-11 Thread Jarosław Staniek
https://bugs.kde.org/show_bug.cgi?id=387798 --- Comment #1 from Jarosław Staniek --- Extended scope to the SELECT section. Neither this work in PostgreSQL: SELECT city as c, c || '!' FROM customers; We have the same soultions as for WHERE: 1. SELECT c, c || '!' FROM (SELECT

[KDb] [Bug 387798] Referencing column aliases in SELECT and WHERE does not work in PostgreSQL

2017-12-11 Thread Jarosław Staniek
https://bugs.kde.org/show_bug.cgi?id=387798 Jarosław Staniek changed: What|Removed |Added Summary|Referencing column aliases |Referencing column aliases