]> granicus.if.org Git - postgresql/commit
Fix core dump in pg_dump --binary-upgrade on zero-column composite type.
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 17 Oct 2014 16:49:09 +0000 (12:49 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 17 Oct 2014 16:49:09 +0000 (12:49 -0400)
commit787e20bd4a33fd076cad1fd3ec58c644a14d8390
tree29f3fc5f50cfbc4ef99db02e43deb8d9232a5fa4
parent7c67b936590bc0f4440d77df3e9c84b23bbf4551
Fix core dump in pg_dump --binary-upgrade on zero-column composite type.

This reverts nearly all of commit 28f6cab61ab8958b1a7dfb019724687d92722538
in favor of just using the typrelid we already have in pg_dump's TypeInfo
struct for the composite type.  As coded, it'd crash if the composite type
had no attributes, since then the query would return no rows.

Back-patch to all supported versions.  It seems to not really be a problem
in 9.0 because that version rejects the syntax "create type t as ()", but
we might as well keep the logic similar in all affected branches.

Report and fix by Rushabh Lathia.
src/bin/pg_dump/pg_dump.c