Re: bug in info.c file - incorrect SQL

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

I am using the new DLL that Hiroshi provided. It is working great in
Powerbuilder.
I am not sure if it has your pg_namespace fixes in it or not.
I would be happy to test any new versions you create, just email me a
DLL.

I will let you know how the new DLL works with VISIO.
Thanks again

-----Original Message-----
From: Bruce Momjian
Sent: Fri 1/3/2003 1:17 PM
To: Hiroshi Inoue
Cc: Jim Holliday; pgsql-odbc(at)postgresql(dot)org
Subject: Re: [ODBC] bug in info.c file - incorrect SQL

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?

--
Bruce Momjian |
http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square,
Pennsylvania 19073

Attachment Content-Type Size
winmail.dat application/ms-tnef 5.5 KB

Browse pgsql-odbc by date

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