Index: phpPgAdmin/lib.inc.php
===================================================================
RCS file: /usr/local/cvsroot/phppgadmin/phpPgAdmin/lib.inc.php,v
retrieving revision 1.3
diff -r1.3 lib.inc.php
440a441
> 	// Generate constraint clauses for UNIQUE and PRIMARY KEY constraints
487a489
> 				$primary_key_name = $row[index_name];
489c491
< 				$schema_create .= "   UNIQUE ($cfgQuotes$row[column_name]$cfgQuotes),$crlf";
---
> 				$schema_create .= "   CONSTRAINT $cfgQuotes$row[index_name]$cfgQuotes UNIQUE ($cfgQuotes$row[column_name]$cfgQuotes),$crlf";
496c498,524
< 		$schema_create .= "   PRIMARY KEY ($primary_key),$crlf";
---
> 		$schema_create .= "   CONSTRAINT $cfgQuotes$primary_key_name$cfgQuotes PRIMARY KEY ($primary_key),$crlf";
> 	}
> 
> 	// Generate constraint clauses for CHECK constraints
> 	$sql_checks = "
> 		SELECT 
> 			rcname as index_name, 
> 			rcsrc 
> 		FROM 
> 			pg_relcheck,
> 			pg_class bc
> 		WHERE 
> 			rcrelid = bc.oid 
> 			and bc.relname = '$table'
> 			and not exists 
> 			(select * from pg_relcheck as c, pg_inherits as i 
> 			where i.inhrelid = pg_relcheck.rcrelid 
> 			and c.rcname = pg_relcheck.rcname 
> 			and c.rcsrc = pg_relcheck.rcsrc 
> 			and c.rcrelid = i.inhparent)
> 	";
> 
> 	$result = @pg_exec($link, pre_query($sql_checks)) or pg_die();
> 
> 	$i = 0;
> 	while ($row = @pg_fetch_array($result, $i++)) {
> 		$schema_create .= "   CONSTRAINT $cfgQuotes$row[index_name]$cfgQuotes CHECK $row[rcsrc],$crlf";