Return-Path: X-Original-To: apmail-sqoop-dev-archive@www.apache.org Delivered-To: apmail-sqoop-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id CC1DDC7F9 for ; Tue, 17 Apr 2012 06:12:17 +0000 (UTC) Received: (qmail 45264 invoked by uid 500); 17 Apr 2012 06:12:17 -0000 Delivered-To: apmail-sqoop-dev-archive@sqoop.apache.org Received: (qmail 45152 invoked by uid 500); 17 Apr 2012 06:12:17 -0000 Mailing-List: contact dev-help@sqoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@sqoop.apache.org Delivered-To: mailing list dev@sqoop.apache.org Received: (qmail 44652 invoked by uid 99); 17 Apr 2012 06:12:13 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Apr 2012 06:12:13 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Apr 2012 06:12:08 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 4675539AD93 for ; Tue, 17 Apr 2012 06:11:48 +0000 (UTC) Date: Tue, 17 Apr 2012 06:11:48 +0000 (UTC) From: "Cheolsoo Park (Updated) (JIRA)" To: dev@sqoop.apache.org Message-ID: <793375752.31821.1334643108505.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (SQOOP-445) Wrong query for getListColumnsQuery in PostgresqlManager MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/SQOOP-445?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Cheolsoo Park updated SQOOP-445: -------------------------------- Comment: was deleted (was: I manually tested the fix that Davide is proposing, and it seems to work perfectly. I don't think that there are any backward compatibility issues that we have to worry about since nobody shouldn't have relied on this behavior...? If anyone disagrees with me, please let me know. Here are commands that I ran to verify the proposed fix: {code} sqooptest=# create table foo (i integer); CREATE TABLE sqooptest=# alter table foo drop column i; ALTER TABLE // without col.ATTISDROPPED = 'f' sqooptest=# SELECT col.ATTNAME FROM PG_CATALOG.PG_NAMESPACE sch, PG_CATALOG.PG_CLASS tab, PG_CATALOG.PG_ATTRIBUTE col WHERE sch.OID = tab.RELNAMESPACE AND tab.OID = col.ATTRELID AND sch.NSPNAME = (SELECT CURRENT_SCHEMA()) AND tab.RELNAME = 'foo' AND col.ATTNUM >= 1; attname ------------------------------ ........pg.dropped.1........ (1 row) // with col.ATTISDROPPED = 'f' sqooptest=# SELECT col.ATTNAME FROM PG_CATALOG.PG_NAMESPACE sch, PG_CATALOG.PG_CLASS tab, PG_CATALOG.PG_ATTRIBUTE col WHERE sch.OID = tab.RELNAMESPACE AND tab.OID = col.ATTRELID AND sch.NSPNAME = (SELECT CURRENT_SCHEMA()) AND tab.RELNAME = 'foo' AND col.ATTNUM >= 1 AND col.ATTISDROPPED = 'f'; attname --------- (0 rows) {code}) > Wrong query for getListColumnsQuery in PostgresqlManager > -------------------------------------------------------- > > Key: SQOOP-445 > URL: https://issues.apache.org/jira/browse/SQOOP-445 > Project: Sqoop > Issue Type: Bug > Components: connectors/postgresql > Affects Versions: 1.4.0-incubating, 1.4.1-incubating > Environment: PostgreSQL 9.1 > Reporter: Davide Grohmann > Original Estimate: 1h > Remaining Estimate: 1h > > When querying for column available in a postgres table from postgres catalog, it returns also the dropped columns from the table in object. It can be easily fixed adding the extra constraint "AND col.ATTISDROPPED = 'f'" at the end of the query which sort out the dropped columns. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira