Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 087FB476373 for ; Fri, 3 Jan 2003 19:18:11 -0500 (EST) Received: from sd.tpf.co.jp (sd.tpf.co.jp [210.161.239.34]) by postgresql.org (Postfix) with SMTP id 97BE3475F1C for ; Fri, 3 Jan 2003 19:18:04 -0500 (EST) Received: (qmail 18404 invoked from network); 4 Jan 2003 00:18:06 -0000 X-Authentication: inoue was authenticated by sd.tpf.co.jp at 4 Jan 2003 00:18:06 -0000 Received: from unknown (HELO mcadnote1) (219.61.40.1) by sd.tpf.co.jp with SMTP; 4 Jan 2003 00:18:06 -0000 From: "Hiroshi Inoue" To: "Bruce Momjian" Cc: "Jim Holliday" , Subject: Re: bug in info.c file - incorrect SQL Date: Sat, 4 Jan 2003 09:20:04 +0900 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) In-Reply-To: <200301032117.h03LHCX10106@candle.pha.pa.us> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200301/21 X-Sequence-Number: 2520 > -----Original Message----- > From: Bruce Momjian [mailto:pgman@candle.pha.pa.us] > > Hiroshi Inoue wrote: > > -----Original Message----- > > From: Jim Holliday > > > > > For the ODBC driver psqlodbc.dll version 7.02.0003 there is > an error in > > the info.c. > > > In 2 places the SQL contains an alias in the FROM clause for the > > pg_namespace > > > table and then references the table in the where clause. The > below cut > > from the > > > info.c file should replace all instances on pg_namespace. in the where > > clause with > > > pn. This should be done in both places. > > > > Does the code give you a wrong result in the first place ? > > I see what Hiroshi is saying now --- there was a reference to > pg_namespace (in WHERE but not in FROM) _and_ a reference to 'pn' as an > alias for pg_namespace (in WHERE and FROM). > > The attached patch fixes this by creating a pn1 and pn2 alias for > pg_namespace in FROM. It also improves some of the alias tags. Applied > to ODBC CVS. Can someone run some tests on these? I've already changed my local source. I would replace your change with my code. regards, Hiroshi Inoue