[pgsql-jp: 30598] Re: Intersectでの抽出結果のソートでのエラー
WADA Hiroyuki
wada @ komine-ag.co.jp
2003年 7月 25日 (金) 15:47:26 JST
和田です。
"yoshiki(R)HORIE" wrote:
> (A) intersect (B) order by date ;
> のような構文で
> ERROR: ORDER BY on a UNION/INTERSECT/EXCEPT result must be on one of the result columns
> のようなメッセージが出ました。
本当に「order by date」で出ました?
(A) intersect (B)
にdateという列があるか確認してください。
> どのようなときに、出るエラーがご指導願えますでしょうか?
order by data+1
のようにSQL92準拠でない形式を使うと上記エラーになります。
analyze.c
* For now, we don't support resjunk sort clauses on the output of a
* setOperation tree --- you can only use the SQL92-spec options of
* selecting an output column by name or number. Enforce by checking
* that transformSortClause doesn't add any items to tlist.
古いバージョンではdateが関数名なのでそのエラーになったのかな?
7.3.2ではなりませんが。
pgsql-jp メーリングリストの案内