X-Original-To: pgsql-odbc-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 393379FB1CD for ; Thu, 24 Aug 2006 10:23:10 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 68163-05 for ; Thu, 24 Aug 2006 10:22:57 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sd.tpf.co.jp (sd.tpf.co.jp [210.161.239.34]) by postgresql.org (Postfix) with SMTP id 329409FB1CA for ; Thu, 24 Aug 2006 10:22:55 -0300 (ADT) Received: (qmail 26888 invoked from network); 24 Aug 2006 22:22:52 +0900 X-Authentication: inoue was authenticated by ftp.tpf.co.jp at 24 Aug 2006 22:22:52 +0900 Received: from unknown (HELO ?192.168.11.3?) (219.61.40.10) by ftp.tpf.co.jp with SMTP; 24 Aug 2006 22:22:52 +0900 Message-ID: <44EDA82A.5060906@tpf.co.jp> Date: Thu, 24 Aug 2006 22:22:50 +0900 From: Hiroshi Inoue User-Agent: Thunderbird 1.5.0.5 (Windows/20060719) MIME-Version: 1.0 To: Blake McBride CC: pgsql-odbc@postgresql.org Subject: Re: SQLStatistics problem References: <7.0.1.0.2.20060823145234.0255e7e0@mcbride.name> In-Reply-To: <7.0.1.0.2.20060823145234.0255e7e0@mcbride.name> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.029 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200608/91 X-Sequence-Number: 8055 Blake McBride wrote: > > Greetings, > > I am having a problem with SQLStatistics. I am using Hiroshi Inoue's > latest ODBC DLL's, PostgreSQL 8.1.2, all on Windows XP. > > I issued the following SQL statements: > > > ALTER TABLE ONLY rights > ADD CONSTRAINT rights_id_key UNIQUE (id); > > > CREATE UNIQUE INDEX blake ON rights (deny_flag); > > When I do a dump of the database the two statements create different > results as I would expect. By "different results" I mean the dump uses > different commands to re-create each of those things. One is a constraint > and the other an index. > > When I use ODBC SQLStatistics I get back records for each of those > statements > but there is no way to distinguish the constraint from the index. > > Any help would be appreciated. One way seems to be to check the existence of pg_constraint data whose name = the index_name. regards, Hiroshi Inoue