[SQL] unnest in SELECT

2011-05-21 Thread Karl Koster
I have a couple of questions regarding unnest. 1) If I issue a select statement "select unnest(vector1) as v from some_table", I cannot seem to use the column alias v in a WHERE or HAVING clause. I can use it in an ORDER BY or GROUP by clause. Is this the way it is supposed to work? 2) If I

[SQL] unnest in SELECT

2011-05-20 Thread Karl Koster
I have a couple of questions regarding unnest. 1) If I issue a select statement "select unnest(vector1) as v from some_table", I cannot seem to use the column alias v in a WHERE or HAVING clause. I can use it in an ORDER BY or GROUP by clause. Is this the way it is supposed to work? 2) If I