Don't try to use a constraint name as domain name
Don't try to use a constraint name as domain name

The bug that caused this to be discovered is that the code was trying to
dereference a NULL or ill-defined pointer, as reported by Michael Mueller;
but what it was doing was wrong anyway, per Heikki.

This patch is Heikki's suggested fix.

greenplum-db/gpdb,zeroae/postgres-xl,lisakowen/gpdb,50wu/gpdb,ashwinstar/gpdb,techdragon/Postgres-XL,arcivanov/postgres-xl,greenplum-db/gpdb,lisakowen/gpdb,snaga/postgres-xl,50wu/gpdb,50wu/gpdb,kmjungersen/PostgresXL,yazun/postgres-xl,tpostgres-projects/tPostgres,ashwinstar/gpdb,oberstet/postgres-xl,yazun/postgres-xl,adam8157/gpdb,ovr/postgres-xl,zeroae/postgres-xl,kmjungersen/PostgresXL,ovr/postgres-xl,lisakowen/gpdb,greenplum-db/gpdb,Postgres-XL/Postgres-XL,zeroae/postgres-xl,lisakowen/gpdb,tpostgres-projects/tPostgres,pavanvd/postgres-xl,oberstet/postgres-xl,jmcatamney/gpdb,xinzweb/gpdb,oberstet/postgres-xl,oberstet/postgres-xl,50wu/gpdb,xinzweb/gpdb,greenplum-db/gpdb,Postgres-XL/Postgres-XL,50wu/gpdb,lisakowen/gpdb,xinzweb/gpdb,ovr/postgres-xl,adam8157/gpdb,snaga/postgres-xl,yazun/postgres-xl,arcivanov/postgres-xl,arcivanov/postgres-xl,kmjungersen/PostgresXL,pavanvd/postgres-xl,Postgres-XL/Postgres-XL,adam8157/gpdb,greenplum-db/gpdb,jmcatamney/gpdb,pavanvd/postgres-xl,snaga/postgres-xl,adam8157/gpdb,50wu/gpdb,pavanvd/postgres-xl,tpostgres-projects/tPostgres,Postgres-XL/Postgres-XL,Postgres-XL/Postgres-XL,kmjungersen/PostgresXL,postmind-net/postgres-xl,xinzweb/gpdb,jmcatamney/gpdb,jmcatamney/gpdb,xinzweb/gpdb,jmcatamney/gpdb,jmcatamney/gpdb,greenplum-db/gpdb,techdragon/Postgres-XL,ashwinstar/gpdb,zeroae/postgres-xl,kmjungersen/PostgresXL,adam8157/gpdb,ovr/postgres-xl,50wu/gpdb,zeroae/postgres-xl,postmind-net/postgres-xl,adam8157/gpdb,tpostgres-projects/tPostgres,ashwinstar/gpdb,ashwinstar/gpdb,greenplum-db/gpdb,lisakowen/gpdb,postmind-net/postgres-xl,techdragon/Postgres-XL,yazun/postgres-xl,jmcatamney/gpdb,xinzweb/gpdb,oberstet/postgres-xl,techdragon/Postgres-XL,postmind-net/postgres-xl,postmind-net/postgres-xl,adam8157/gpdb,xinzweb/gpdb,snaga/postgres-xl,arcivanov/postgres-xl,lisakowen/gpdb,adam8157/gpdb,lisakowen/gpdb,snaga/postgres-xl,yazun/postgres-xl,pavanvd/postgres-xl,arcivanov/postgres-xl,ashwinstar/gpdb,jmcatamney/gpdb,arcivanov/postgres-xl,tpostgres-projects/tPostgres,xinzweb/gpdb,techdragon/Postgres-XL,ashwinstar/gpdb,greenplum-db/gpdb,ovr/postgres-xl,ashwinstar/gpdb,50wu/gpdb