Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 061789F9357 for ; Fri, 1 Dec 2006 01:43:50 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-new, port 10024) with ESMTP id 46319-03 for ; Fri, 1 Dec 2006 01:43:43 -0400 (AST) Received: from pgfoundry.org (pgfoundry.org [200.46.204.130]) by postgresql.org (Postfix) with ESMTP id BB39B9F9EED for ; Fri, 1 Dec 2006 01:43:44 -0400 (AST) Received: from localhost (unknown [200.46.204.183]) by pgfoundry.org (Postfix) with ESMTP id 2F0DA2172AD for ; Fri, 1 Dec 2006 05:42:45 +0000 (UTC) Received: from pgfoundry.org ([200.46.204.130]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-new, port 10024) with ESMTP id 15540-01-10; Fri, 1 Dec 2006 01:42:34 -0400 (AST) Received: by pgfoundry.org (Postfix, from userid 80) id CB8B6218677; Fri, 1 Dec 2006 05:10:31 +0000 (UTC) To: noreply@pgfoundry.org From: Subject: [ psqlodbc-Bugs-1000720 ] SQLGetInfo SQL_DATABASE_NAME no info Content-type: text/plain; charset=UTF-8 Message-Id: <20061201051031.CB8B6218677@pgfoundry.org> Date: Fri, 1 Dec 2006 05:10:31 +0000 (UTC) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200612/3 X-Sequence-Number: 8450 Bugs item #1000720, was opened at 2006-08-29 16:25 You can respond by visiting: http://pgfoundry.org/tracker/?func=detail&atid=538&aid=1000720&group_id=1000125 Category: None Group: None Status: Open Resolution: None Priority: 3 Submitted By: Farid Zidan (faridz) Assigned to: Nobody (None) Summary: SQLGetInfo SQL_DATABASE_NAME no info Initial Comment: Driver does not return database name for SQLGetInfo DATABASE_NAME // database name rc = SQLGetInfo( m_hdbc, SQL_DATABASE_NAME, m_szDatabaseName, sizeof( m_szDatabaseName ), &nLenOut ); ---------------------------------------------------------------------- >Comment By: Farid Zidan (faridz) Date: 2006-12-01 00:10 Message: I only need to know the name of the database for the connection. I don't need to do any cross-catalog selects, etc. ---------------------------------------------------------------------- Comment By: Farid Zidan (faridz) Date: 2006-08-30 17:53 Message: The current database is exactly what SQL_DATABASE_NAME should return. Right now it returns nothing. MS DOC for SQL_DATABASE_NAME A character string with the name of the current database in use, if the data source defines a named object called "database". Whether the dbms supports qualifying objects by their catalog name is determined by SQL_CATALOG_USAGE which is appears to reflect the driver capability right now and is ok. ---------------------------------------------------------------------- Comment By: Hiroshi Inoue (hinoue) Date: 2006-08-30 17:33 Message: The driver has returned "" for the request because PostgreSQL didn't support database.schema.table notation (even schema support was unavailable until 7.3). Though PostgreSQL supports the notation in recent versions, I'm not sure if the driver is safe for the notation. PostgreSQL is essentially a catalog-less dbms. Though PostgreSQL allows the notation, the only valid database is the current one. regards, Hiroshi Inoue ---------------------------------------------------------------------- You can respond by visiting: http://pgfoundry.org/tracker/?func=detail&atid=538&aid=1000720&group_id=1000125