Lines Matching refs:y
24 # "ORDER BY y" binds to the output result-set column named "y"
25 # if available. If no output column is named "y", then try to
26 # bind against an input column named "y".
32 CREATE TABLE t1(x, y); INSERT INTO t1 VALUES(11,22);
33 CREATE TABLE t2(y, z); INSERT INTO t2 VALUES(33,44);
34 SELECT 1 AS y FROM t1, t2 ORDER BY y;
39 SELECT 1 AS yy FROM t1, t2 ORDER BY y;
41 } {1 {ambiguous column name: y}}
44 CREATE TABLE t3(x,y); INSERT INTO t3 VALUES(11,44),(33,22);
45 SELECT x AS y FROM t3 ORDER BY y;
50 SELECT x AS yy FROM t3 ORDER BY y;
68 # The "ORDER BY y COLLATE nocase" form works the same as "ORDER BY y".
69 # The "y" binds more tightly to output columns than to input columns.
72 # Note that PostgreSQL considers "y COLLATE nocase" to be an expression
77 SELECT 2 AS y FROM t1, t2 ORDER BY y COLLATE nocase;
82 SELECT 2 AS yy FROM t1, t2 ORDER BY y COLLATE nocase;
84 } {1 {ambiguous column name: y}}
87 SELECT x AS y FROM t3 ORDER BY y COLLATE nocase;
92 SELECT x AS yy FROM t3 ORDER BY y COLLATE nocase;
115 SELECT 3 AS y FROM t1, t2 ORDER BY +y;
117 } {1 {ambiguous column name: y}}
120 SELECT 2 AS yy FROM t1, t2 ORDER BY +y;
122 } {1 {ambiguous column name: y}}
125 SELECT x AS y FROM t3 ORDER BY +y;
130 SELECT x AS yy FROM t3 ORDER BY +y;
152 } {1 x 1 y 1 z 2 x 2 y 2 z 3 z 3 y 3 x}
167 } {1 x 1 x 1 y}
173 } {1 x 1 x 1 y}
180 } {1 y 2 x}
184 } {1 y 2 x}
207 SELECT 2 AS x WHERE (SELECT x AS y WHERE 3>y);
210 SELECT 2 AS x WHERE (SELECT x AS y WHERE 1>y);