Ian Morgan <imorgan(at)webcon(dot)net> writes:
> Even if adding ORDER BY to a UNION is really sub-optimal SQL, shouldn't
> pg_dump (and even psql's \d <viewname>) produce SQL that actually
> works
I didn't say it wasn't a bug ;-) ... just pointing out that fixing it
doesn't seem very high priority. I'll do something about it next time
I have occasion to touch ruleutils.c.
regards, tom lane