[libpostgresql-jdbc-java] 08/13: When retrieving the columns that compose a composite type don't retrieve system columns (like xmin/xmax/...) that you'll find if the type is from a table or view. A more comprehensive rework of getProcedureColumns will go into HEAD.

Emmanuel Bourg ebourg-guest at moszumanska.debian.org
Mon Jan 9 10:20:04 UTC 2017


This is an automated email from the git hooks/post-receive script.

ebourg-guest pushed a commit to tag REL8_1_410
in repository libpostgresql-jdbc-java.

commit 1d83d4d4f17e68e94f4f0273a73e4e4e6ba182a0
Author: Kris Jurka <books at ejurka.com>
Date:   Sun Jul 15 15:10:18 2007 +0000

    When retrieving the columns that compose a composite type don't
    retrieve system columns (like xmin/xmax/...) that you'll find if the
    type is from a table or view.  A more comprehensive rework of
    getProcedureColumns will go into HEAD.
---
 org/postgresql/jdbc2/AbstractJdbc2DatabaseMetaData.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/org/postgresql/jdbc2/AbstractJdbc2DatabaseMetaData.java b/org/postgresql/jdbc2/AbstractJdbc2DatabaseMetaData.java
index 22b0e30..353c22f 100644
--- a/org/postgresql/jdbc2/AbstractJdbc2DatabaseMetaData.java
+++ b/org/postgresql/jdbc2/AbstractJdbc2DatabaseMetaData.java
@@ -3,7 +3,7 @@
 * Copyright (c) 2004-2005, PostgreSQL Global Development Group
 *
 * IDENTIFICATION
-*   $PostgreSQL: pgjdbc/org/postgresql/jdbc2/AbstractJdbc2DatabaseMetaData.java,v 1.24.2.2 2005/12/04 20:22:59 jurka Exp $
+*   $PostgreSQL: pgjdbc/org/postgresql/jdbc2/AbstractJdbc2DatabaseMetaData.java,v 1.24.2.3 2006/02/03 21:10:29 jurka Exp $
 *
 *-------------------------------------------------------------------------
 */
@@ -1990,7 +1990,7 @@ public abstract class AbstractJdbc2DatabaseMetaData
             // if we are returning a multi-column result.
             if (returnTypeType.equals("c"))
             {
-                String columnsql = "SELECT a.attname,a.atttypid FROM pg_catalog.pg_attribute a WHERE a.attrelid = " + returnTypeRelid + " ORDER BY a.attnum ";
+                String columnsql = "SELECT a.attname,a.atttypid FROM pg_catalog.pg_attribute a WHERE a.attrelid = " + returnTypeRelid + " AND a.attnum > 0 ORDER BY a.attnum ";
                 ResultSet columnrs = connection.createStatement().executeQuery(columnsql);
                 while (columnrs.next())
                 {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/libpostgresql-jdbc-java.git



More information about the pkg-java-commits mailing list