Re: [SQL] alias not applied

2007-02-09 Thread Sabin Coanda
You are right. I use "PostgreSQL 8.1.0 on i686-pc-mingw32, compiled by GCC gcc.exe (GCC) 3.4.2 (mingw-special)" on Windows. But I just tried it on a newer version and it works well ( "PostgreSQL 8.1.4 on i686-redhat-linux-gnu, compiled by GCC gcc (GCC) 4.0.2 20051125 (Red Hat 4.0.2-8)" ). Than

Re: [SQL] alias not applied

2007-02-09 Thread Tom Lane
"Sabin Coanda" <[EMAIL PROTECTED]> writes: > I have two queries: > 1. SELECT i AS "PK_ID", d AS "Deleted" FROM ( SELECT 52 AS i, true AS d ) x > ORDER BY i > 2. SELECT i AS "PK_ID", d AS "Deleted" FROM ( SELECT 49 AS i, true AS d > UNION SELECT 51 AS i, true AS d ) x ORDER BY i > The first re

Re: [SQL] alias not applied

2007-02-09 Thread Frank Bax
At 11:04 AM 2/9/07, Sabin Coanda wrote: I have two queries: 1. SELECT i AS "PK_ID", d AS "Deleted" FROM ( SELECT 52 AS i, true AS d ) x ORDER BY i 2. SELECT i AS "PK_ID", d AS "Deleted" FROM ( SELECT 49 AS i, true AS d UNION SELECT 51 AS i, true AS d ) x ORDER BY i The first returns the colum

[SQL] alias not applied

2007-02-09 Thread Sabin Coanda
Hi all, I have two queries: 1. SELECT i AS "PK_ID", d AS "Deleted" FROM ( SELECT 52 AS i, true AS d ) x ORDER BY i 2. SELECT i AS "PK_ID", d AS "Deleted" FROM ( SELECT 49 AS i, true AS d UNION SELECT 51 AS i, true AS d ) x ORDER BY i The first returns the columns "PK_ID", "Deleted" The secon