[libpostgresql-jdbc-java] 07/14: 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:25 UTC 2017


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

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

commit 4319a1eeb072852d1e5b139caa68377d6e2bbcc1
Author: Kris Jurka <books at ejurka.com>
Date:   Sun Jul 15 15:10:13 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 b8f67fb..5262bc3 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.33 2006/12/01 08:53:45 jurka Exp $
+*   $PostgreSQL: pgjdbc/org/postgresql/jdbc2/AbstractJdbc2DatabaseMetaData.java,v 1.33.2.1 2007/04/11 07:33:26 jurka Exp $
 *
 *-------------------------------------------------------------------------
 */
@@ -1807,7 +1807,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