Skip to content
Snippets Groups Projects
Commit 339ce34b authored by Bruce Momjian's avatar Bruce Momjian
Browse files

As if my JDBC patch hasn't already caused enough grief, there is now a

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
parent cdc7170e
No related branches found
No related tags found
No related merge requests found
...@@ -1722,7 +1722,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData ...@@ -1722,7 +1722,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
// IMPORTANT: the query must be enclosed in ( ) // IMPORTANT: the query must be enclosed in ( )
private static final String getTableTypes[][] = { private static final String getTableTypes[][] = {
{"TABLE", "(relkind='r' and relhasrules='f' and relname !~ '^pg_' and relname !~ '^xinv')"}, {"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')"}, {"INDEX", "(relkind='i' and relname !~ '^pg_' and relname !~ '^xinx')"},
{"LARGE OBJECT", "(relkind='r' and relname ~ '^xinv')"}, {"LARGE OBJECT", "(relkind='r' and relname ~ '^xinv')"},
{"SEQUENCE", "(relkind='S' and relname !~ '^pg_')"}, {"SEQUENCE", "(relkind='S' and relname !~ '^pg_')"},
......
...@@ -1722,7 +1722,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData ...@@ -1722,7 +1722,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
// IMPORTANT: the query must be enclosed in ( ) // IMPORTANT: the query must be enclosed in ( )
private static final String getTableTypes[][] = { private static final String getTableTypes[][] = {
{"TABLE", "(relkind='r' and relhasrules='f' and relname !~ '^pg_' and relname !~ '^xinv')"}, {"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')"}, {"INDEX", "(relkind='i' and relname !~ '^pg_' and relname !~ '^xinx')"},
{"LARGE OBJECT", "(relkind='r' and relname ~ '^xinv')"}, {"LARGE OBJECT", "(relkind='r' and relname ~ '^xinv')"},
{"SEQUENCE", "(relkind='S' and relname !~ '^pg_')"}, {"SEQUENCE", "(relkind='S' and relname !~ '^pg_')"},
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment