Thread: pgsql/src/interfaces/jdbc/org/postgresql/jdbc1 (DatabaseMetaData.java)

pgsql/src/interfaces/jdbc/org/postgresql/jdbc1 (DatabaseMetaData.java)

From
Bruce Momjian - CVS
Date:
  Date: Tuesday, September 12, 2000 @ 14:56:03
Author: momjian

Update of /home/projects/pgsql/cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc1
     from hub.org:/home/projects/pgsql/tmp/cvs-serv77884/pgsql/src/interfaces/jdbc/org/postgresql/jdbc1

Modified Files:
    DatabaseMetaData.java

-----------------------------  Log Message  -----------------------------

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


RE: pgsql/src/interfaces/jdbc/org/postgresql/jdbc1 (DatabaseMetaData.java)

From
"Hiroshi Inoue"
Date:
> -----Original Message-----
> From: Behalf Of Bruce Momjian - CVS
>

[snip]

- -----------------------------  Log Message  -----------------------------
>
> 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')"},
>

Current jdbc driver seems to be able to get no VIEW information
from any RELEASE version of backends.

Hmm,it seems that client app/libs don't mind backward incompatibility.
Don't I have to bother about backward incomatibility which would be
caused by my change ?
If so,I would commit my change about ALTER TABLE DROP COLUMN.

Regards.

Hiroshi Inoue

> > 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')"},
> >
>
> Current jdbc driver seems to be able to get no VIEW information
> from any RELEASE version of backends.
>
> Hmm,it seems that client app/libs don't mind backward incompatibility.
> Don't I have to bother about backward incomatibility which would be
> caused by my change ?
> If so,I would commit my change about ALTER TABLE DROP COLUMN.

So the issue is how to make the 7.1 jdbc driver handle views from >=7.1
databases, and <7.1 databases.  Good question.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026


On Tue, 12 Sep 2000, Bruce Momjian wrote:

> > > 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')"},
> > >
> >
> > Current jdbc driver seems to be able to get no VIEW information
> > from any RELEASE version of backends.
> >
> > Hmm,it seems that client app/libs don't mind backward incompatibility.
> > Don't I have to bother about backward incomatibility which would be
> > caused by my change ?
> > If so,I would commit my change about ALTER TABLE DROP COLUMN.
>
> So the issue is how to make the 7.1 jdbc driver handle views from >=7.1
> databases, and <7.1 databases.  Good question.

In the past, I've tried to keep compatibility within x.y.z releases (where
z is the only changing value), but not when x or y change.

ie, 6.4.x drivers would be compatible with each other but not with
6.2.x. Same with 7.0.x and 6.5.x

So if 7.1 has this change, then it shouldn't have to be compatible with
7.0.x (going from past history).

Peter (getting lost in a maze of patches)...

;-)