use that typmod not -1 as the typmod of the CASE result. Part of response to bug#513.
Attach a file by drag & drop or click to upload