From: | Rene Pijlman <rpijlman(at)wanadoo(dot)nl> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-jdbc(at)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: [JDBC] JDBC pg_description update needed for CVS tip |
Date: | 2001-08-12 22:38:17 |
Message-ID: | 6a0ento77m7mrf5c0i8njd4adtdrahn9s2@4ax.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-jdbc pgsql-patches |
On Fri, 10 Aug 2001 16:08:50 -0400, you wrote:
>The problem is in DatabaseMetaData.java (same code in both jdbc1 and
>jdbc2, looks like). It does direct access to pg_description that isn't
>right anymore. In getTables, instead of
>
> java.sql.ResultSet dr = connection.ExecSQL("select description from pg_description where objoid="+r.getInt(2));
>
>it should be
>
> java.sql.ResultSet dr = connection.ExecSQL("select obj_description("+r.getInt(2)+",'pg_class')");
Done that (columns to). When testing I noticed a difference
between 7.1 and 7.2: when there is no comment on a table or
column, 7.1 returns the string "no remarks" in the REMARKS
column of the ResultSet from getTables()/getColumns(), whereas
7.2 returns null.
So it appears that your new statement that uses
obj_description() and col_description() returns one row with a
null when there is no comment, instead of 0 rows. Is this
intentional?
The JDBC spec says: "String object containing an explanatory
comment on the table/column, which may be null". So actually,
this new behaviour is closer to the standard than the old
behaviour and I'm inclined to leave it this way. In fact, I
might as well remove the defaultRemarks code from
DatabaseMetaData.java.
This might break existing code that doesn't follow the JDBC spec
and isn't prepared to handle a null in the REMARKS column of
getTables()/getColumns().
Regards,
René Pijlman
From | Date | Subject | |
---|---|---|---|
Next Message | Trond Eivind =?iso-8859-1?q?Glomsr=F8d?= | 2001-08-13 01:03:43 | Re: To be 7.1.3 or not to be 7.1.3? |
Previous Message | Justin Clift | 2001-08-12 22:17:17 | Re: Re: [PATCHES] Select parser at runtime |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2001-08-13 02:06:43 | Re: [JDBC] JDBC pg_description update needed for CVS tip |
Previous Message | Tom Lane | 2001-08-12 16:31:41 | Re: [JDBC] JDBC pg_description update needed for CVS tip |
From | Date | Subject | |
---|---|---|---|
Next Message | Joe Conway | 2001-08-13 01:04:07 | Re: bytea_ops |
Previous Message | Justin Clift | 2001-08-12 22:17:17 | Re: Re: [PATCHES] Select parser at runtime |