]> granicus.if.org Git - postgresql/commitdiff
As if my JDBC patch hasn't already caused enough grief, there is now a
authorBruce Momjian <bruce@momjian.us>
Tue, 12 Sep 2000 18:56:04 +0000 (18:56 +0000)
committerBruce Momjian <bruce@momjian.us>
Tue, 12 Sep 2000 18:56:04 +0000 (18:56 +0000)
one-line change necessary. Due to the Mark Holloman "New Relkind for
Views" patch, my support for views in the driver will need to be updated
to match. The change to DatabaseMetaData.getTableTypes[][] is as
follows:

-    {"VIEW",           "(relkind='r' and relhasrules='t' and relname !~
'^pg_' and relname !~ '^xinv')"},
+    {"VIEW",           "(relkind='v' and relname !~ '^pg_' and relname
!~ '^xinv')"},

Christopher Cain

src/interfaces/jdbc/org/postgresql/jdbc1/DatabaseMetaData.java
src/interfaces/jdbc/org/postgresql/jdbc2/DatabaseMetaData.java

index 52e871e1697dc81d8972f847f3773954a0d66630..674c0d16e1078ce6e9e23f6ebc4817f537e72340 100644 (file)
@@ -1722,7 +1722,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
   // IMPORTANT: the query must be enclosed in ( )
   private static final String getTableTypes[][] = {
     {"TABLE",          "(relkind='r' and relhasrules='f' and relname !~ '^pg_' and relname !~ '^xinv')"},
-    {"VIEW",           "(relkind='r' and relhasrules='t' and relname !~ '^pg_' and relname !~ '^xinv')"},
+    {"VIEW",        "(relkind='v' and relname !~ '^pg_' and relname !~ '^xinv')"},
     {"INDEX",          "(relkind='i' and relname !~ '^pg_' and relname !~ '^xinx')"},
     {"LARGE OBJECT",   "(relkind='r' and relname ~ '^xinv')"},
     {"SEQUENCE",       "(relkind='S' and relname !~ '^pg_')"},
index 3b30d0a2f92a1be1ea207b6a83237913a441fc8c..4b8451d1fccfe1ee4dff166267c2e2d1864def30 100644 (file)
@@ -1722,7 +1722,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
   // IMPORTANT: the query must be enclosed in ( )
   private static final String getTableTypes[][] = {
     {"TABLE",          "(relkind='r' and relhasrules='f' and relname !~ '^pg_' and relname !~ '^xinv')"},
-    {"VIEW",           "(relkind='r' and relhasrules='t' and relname !~ '^pg_' and relname !~ '^xinv')"},
+    {"VIEW",        "(relkind='v' and relname !~ '^pg_' and relname !~ '^xinv')"},
     {"INDEX",          "(relkind='i' and relname !~ '^pg_' and relname !~ '^xinx')"},
     {"LARGE OBJECT",   "(relkind='r' and relname ~ '^xinv')"},
     {"SEQUENCE",       "(relkind='S' and relname !~ '^pg_')"},