pgsql-bugs@postgresql.org writes:
> There are two nearly identical tables, differ from each other by the
> length of corresponding fields of type CHARACTER (one has
> CHARACTER(20) field, other has CHARACTER(30) field).
> when i do "select * from table1 union select * from table2" backend
> crashes with message:
> FATAL 1: Memory exhausted in AllocSetAlloc()
> When char fileds have the same size, crash does not occur.
> This bug takes place on 7.0.2 and 7.0.3 versions
This is fixed for 7.1. Older versions have quite a few problems with
cross-datatype UNIONs :-(
regards, tom lane