*** src/bin/psql/describe.c.orig	Fri Oct 14 23:00:19 2005
--- src/bin/psql/describe.c	Thu Oct 20 01:09:29 2005
***************
*** 1036,1044 ****
  		if (tableinfo.checks)
  		{
  			printfPQExpBuffer(&buf,
! 							  "SELECT "
! 							  "pg_catalog.pg_get_constraintdef(r.oid, true), "
! 							  "conname\n"
  							  "FROM pg_catalog.pg_constraint r\n"
  					"WHERE r.conrelid = '%s' AND r.contype = 'c' ORDER BY 1",
  							  oid);
--- 1036,1043 ----
  		if (tableinfo.checks)
  		{
  			printfPQExpBuffer(&buf,
! 							  "SELECT r.conname, "
! 							  "pg_catalog.pg_get_constraintdef(r.oid, true)\n"
  							  "FROM pg_catalog.pg_constraint r\n"
  					"WHERE r.conrelid = '%s' AND r.contype = 'c' ORDER BY 1",
  							  oid);
***************
*** 1192,1199 ****
  			for (i = 0; i < check_count; i++)
  			{
  				printfPQExpBuffer(&buf, _("    \"%s\" %s"),
! 								  PQgetvalue(result2, i, 1),
! 								  PQgetvalue(result2, i, 0));
  
  				footers[count_footers++] = pg_strdup(buf.data);
  			}
--- 1191,1198 ----
  			for (i = 0; i < check_count; i++)
  			{
  				printfPQExpBuffer(&buf, _("    \"%s\" %s"),
! 								  PQgetvalue(result2, i, 0),
! 								  PQgetvalue(result2, i, 1));
  
  				footers[count_footers++] = pg_strdup(buf.data);
  			}
