projects
/
webmin.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
60f789b
)
Better primary key detection
author
Jamie Cameron
<jcameron@webmin.com>
Fri, 2 Nov 2007 21:55:05 +0000
(21:55 +0000)
committer
Jamie Cameron
<jcameron@webmin.com>
Fri, 2 Nov 2007 21:55:05 +0000
(21:55 +0000)
postgresql/postgresql-lib.pl
patch
|
blob
|
history
diff --git
a/postgresql/postgresql-lib.pl
b/postgresql/postgresql-lib.pl
index
8158d2a
..
cf348a4
100644
(file)
--- a/
postgresql/postgresql-lib.pl
+++ b/
postgresql/postgresql-lib.pl
@@
-206,7
+206,8
@@
if (&supports_schemas($_[0])) {
# Work out which fields are the primary key
if (&supports_indexes()) {
- local ($keyidx) = grep { $_ eq $_[1]."_pkey" }
+ local ($keyidx) = grep { $_ eq $_[1]."_pkey" ||
+ $_ eq "pk_".$_[1] }
&list_indexes($_[0]);
if ($keyidx) {
local $istr = &index_structure($_[0], $keyidx);