Re: bug in info.c file - incorrect SQL

From: "Hiroshi Inoue" <Inoue(at)tpf(dot)co(dot)jp>
To: "Bruce Momjian" <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: "Jim Holliday" <jholliday(at)aurigin(dot)com>, <pgsql-odbc(at)postgresql(dot)org>
Subject: Re: bug in info.c file - incorrect SQL
Date: 2003-01-04 00:20:04
Message-ID: EKEJJICOHDIEMGPNIFIJCEJIKDAA.Inoue@tpf.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

> -----Original Message-----
> From: Bruce Momjian [mailto:pgman(at)candle(dot)pha(dot)pa(dot)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

In response to

Responses

Browse pgsql-odbc by date

  From Date Subject
Next Message Bruce Momjian 2003-01-04 00:52:45 Re: bug in info.c file - incorrect SQL
Previous Message Tom Lane 2003-01-03 21:38:42 Re: bug in info.c file - incorrect SQL