- Notifications
You must be signed in to change notification settings - Fork5
Commit1ebbfc1
committed
Attached is the patch requested by Tom Lane (see below). It
includes two changes in the JDBC driver:1) When connected to a backend >= 7.2: use obj_description() andcol_description() instead of direct access to pg_description.2) In DatabaseMetaData.getTables()/getColumns()/getProcedures():when there is no comment on the object, return null in theREMARKS column of the ResultSet, instead of the default string"no remarks".Change 2 first appeared as a side-effect of change 1, but it isactually more compliant with the JDBC spec: "String objectcontaining an explanatory comment on the table/column/procedure,which may be null". The default string "no remarks" was strictlyspeaking incorrect, as it could not be distinguished from a realuser comment "no remarks". So I removed the default stringcompletely.Change 2 might break existing code that doesn't follow the JDBCspec and isn't prepared to handle a null in the REMARKS columnof getTables()/getColumns()/getProcedures.Patch tested with jdbc2 against both a 7.1 and a CVS tipbackend. I did not have a jdbc1 environment to build and testwith, but since the touched code is identical in jdbc1 and jdbc2I don't foresee any problems.Regards,Ren? Pijlman1 parentb5453fa commit1ebbfc1
File tree
2 files changed
+64
-39
lines changed- src/interfaces/jdbc/org/postgresql
- jdbc1
- jdbc2
2 files changed
+64
-39
lines changedLines changed: 32 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | 46 | | |
51 | 47 | | |
52 | 48 | | |
| |||
1517 | 1513 | | |
1518 | 1514 | | |
1519 | 1515 | | |
1520 | | - | |
1521 | | - | |
1522 | 1516 | | |
1523 | 1517 | | |
1524 | 1518 | | |
| |||
1540 | 1534 | | |
1541 | 1535 | | |
1542 | 1536 | | |
1543 | | - | |
| 1537 | + | |
1544 | 1538 | | |
1545 | 1539 | | |
1546 | 1540 | | |
| |||
1684 | 1678 | | |
1685 | 1679 | | |
1686 | 1680 | | |
| 1681 | + | |
1687 | 1682 | | |
1688 | 1683 | | |
1689 | 1684 | | |
| |||
1704 | 1699 | | |
1705 | 1700 | | |
1706 | 1701 | | |
1707 | | - | |
1708 | | - | |
1709 | 1702 | | |
1710 | 1703 | | |
1711 | 1704 | | |
1712 | 1705 | | |
1713 | 1706 | | |
1714 | | - | |
| 1707 | + | |
| 1708 | + | |
| 1709 | + | |
| 1710 | + | |
| 1711 | + | |
| 1712 | + | |
| 1713 | + | |
| 1714 | + | |
| 1715 | + | |
1715 | 1716 | | |
1716 | 1717 | | |
1717 | 1718 | | |
1718 | | - | |
1719 | | - | |
| 1719 | + | |
1720 | 1720 | | |
1721 | 1721 | | |
1722 | 1722 | | |
| |||
1919 | 1919 | | |
1920 | 1920 | | |
1921 | 1921 | | |
1922 | | - | |
1923 | | - | |
1924 | | - | |
1925 | | - | |
| 1922 | + | |
| 1923 | + | |
| 1924 | + | |
| 1925 | + | |
| 1926 | + | |
| 1927 | + | |
| 1928 | + | |
| 1929 | + | |
| 1930 | + | |
| 1931 | + | |
| 1932 | + | |
| 1933 | + | |
1926 | 1934 | | |
1927 | 1935 | | |
1928 | 1936 | | |
1929 | 1937 | | |
1930 | 1938 | | |
1931 | | - | |
| 1939 | + | |
| 1940 | + | |
| 1941 | + | |
| 1942 | + | |
| 1943 | + | |
| 1944 | + | |
| 1945 | + | |
1932 | 1946 | | |
1933 | 1947 | | |
1934 | 1948 | | |
1935 | 1949 | | |
1936 | | - | |
1937 | | - | |
| 1950 | + | |
1938 | 1951 | | |
1939 | 1952 | | |
1940 | 1953 | | |
| |||
1985 | 1998 | | |
1986 | 1999 | | |
1987 | 2000 | | |
1988 | | - | |
1989 | 2001 | | |
1990 | 2002 | | |
1991 | 2003 | | |
| |||
Lines changed: 32 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | 46 | | |
51 | 47 | | |
52 | 48 | | |
| |||
1517 | 1513 | | |
1518 | 1514 | | |
1519 | 1515 | | |
1520 | | - | |
1521 | | - | |
1522 | 1516 | | |
1523 | 1517 | | |
1524 | 1518 | | |
| |||
1540 | 1534 | | |
1541 | 1535 | | |
1542 | 1536 | | |
1543 | | - | |
| 1537 | + | |
1544 | 1538 | | |
1545 | 1539 | | |
1546 | 1540 | | |
| |||
1684 | 1678 | | |
1685 | 1679 | | |
1686 | 1680 | | |
| 1681 | + | |
1687 | 1682 | | |
1688 | 1683 | | |
1689 | 1684 | | |
| |||
1704 | 1699 | | |
1705 | 1700 | | |
1706 | 1701 | | |
1707 | | - | |
1708 | | - | |
1709 | 1702 | | |
1710 | 1703 | | |
1711 | 1704 | | |
1712 | 1705 | | |
1713 | 1706 | | |
1714 | | - | |
| 1707 | + | |
| 1708 | + | |
| 1709 | + | |
| 1710 | + | |
| 1711 | + | |
| 1712 | + | |
| 1713 | + | |
| 1714 | + | |
| 1715 | + | |
1715 | 1716 | | |
1716 | 1717 | | |
1717 | 1718 | | |
1718 | | - | |
1719 | | - | |
| 1719 | + | |
1720 | 1720 | | |
1721 | 1721 | | |
1722 | 1722 | | |
| |||
1919 | 1919 | | |
1920 | 1920 | | |
1921 | 1921 | | |
1922 | | - | |
1923 | | - | |
1924 | | - | |
1925 | | - | |
| 1922 | + | |
| 1923 | + | |
| 1924 | + | |
| 1925 | + | |
| 1926 | + | |
| 1927 | + | |
| 1928 | + | |
| 1929 | + | |
| 1930 | + | |
| 1931 | + | |
| 1932 | + | |
| 1933 | + | |
1926 | 1934 | | |
1927 | 1935 | | |
1928 | 1936 | | |
1929 | 1937 | | |
1930 | 1938 | | |
1931 | | - | |
| 1939 | + | |
| 1940 | + | |
| 1941 | + | |
| 1942 | + | |
| 1943 | + | |
| 1944 | + | |
| 1945 | + | |
1932 | 1946 | | |
1933 | 1947 | | |
1934 | 1948 | | |
1935 | 1949 | | |
1936 | | - | |
1937 | | - | |
| 1950 | + | |
1938 | 1951 | | |
1939 | 1952 | | |
1940 | 1953 | | |
| |||
0 commit comments
Comments
(0)