I've gotten part-way toward implementing a CASE construct in Postgres:
select case when i = 1 then 10 when i = 2 then 20 end from t;
(the other parts of the case clause are supported also). But I'm running
into problems in the executor, in that although the query tree seems to
be well-formed, there is not a corresponding plan or plan tree (not sure
of the terminology). Any suggestions on where to start, or interest in
working on it? (hint, hint)
btw, I'm hoping to have a superset of the SQL92 definition; the standard
allows only constants in the "then" clauses afaik, but I'm shooting for
allowing full expressions...
- Tom