Jochem van Dieten <jochemd@oli.tudelft.nl> writes:
> (gdb) bt
> #0 0x16e73f in elog_message_prefix ()
> #1 0x16da26 in elog ()
> #2 0x82b3d in typecast_expression ()
> #3 0x818d9 in transformExpr ()
> #4 0x89d4d in transformTargetEntry ()
> #5 0x8a021 in transformTargetList ()
> #6 0x3cb78 in transformSelectStmt ()
> #7 0x3ab6f in transformStmt ()
> #8 0x3a79c in parse_analyze ()
Well, that trace makes it look like it's unhappy about the "null::text"
in the command, because there is no other typecast in the SELECT target
statement. Looking at the 7.3 code, the only very plausible reason for
the failure is if either "unknown" or "text" has disappeared from
pg_type, so that one of the typeidIsValid tests in can_coerce_type
fails. But that doesn't explain why you don't see the failure
interactively --- seems like "select null::text" should always fail in
that database, if that's where the problem is.
I confess to bewilderment ... anyone have a clue?
regards, tom lane