Bug when looking for foreign keys

From: Luiz Angelo Daros de Luca <luizd(at)inf(dot)ufsc(dot)br>
To: pgsql-odbc(at)postgresql(dot)org
Subject: Bug when looking for foreign keys
Date: 2003-08-13 22:06:54
Message-ID: 3F3AB67E.9040009@inf.ufsc.br
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

Hello,

I used Ms Visio to reverse engeneer my database and generate
documentation. The problem is that it returns an error when it tries to
get the foreign keys. By generating the log, I found the problem. The
last comma of the FROM statement is absent. My version is the last one
in homepage.

SELECT pt.tgargs, pt.tgnargs,
pt.tgdeferrable, pt.tginitdeferred,
pp1.proname, pp2.proname, pc.oid,
pc1.oid, pc1.relname, pn.nspname FROM
pg_catalog.pg_class pc, pg_catalog.pg_proc
pp1, pg_catalog.pg_proc pp2,
pg_catalog.pg_trigger pt1, pg_catalog.pg_trigger
pt2, pg_catalog.pg_proc pp, pg_catalog.pg_trigger
pt, pg_catalog.pg_class pc1,
pg_catalog.pg_namespace pn pg_catalog.pg_namespace pn1
WHERE pt.tgrelid = pc.oid AND pp.oid = pt.tgfoid AND
pt1.tgconstrrelid = pc.oid AND pp1.oid = pt1.tgfoid AND pt2.tgfoid =
pp2.oid AND pt2.tgconstrrelid = pc.oid AND
((pc.relname='CamposConfiguracao') AND (pn1.oid = pc.relnamespace) AND
(pn1.nspname = 'public') AND (pp.proname LIKE '%ins') AND (pp1.proname
LIKE '%upd') AND (pp2.proname LIKE '%del') AND
(pt1.tgrelid=pt.tgconstrrelid) AND (pt1.tgconstrname=pt.tgconstrname)
AND (pt2.tgrelid=pt.tgconstrrelid) AND
(pt2.tgconstrname=pt.tgconstrname) AND (pt.tgconstrrelid=pc1.oid) AND
(pc1.relnamespace=pn.oid))

Fixed become:

SELECT pt.tgargs, pt.tgnargs,
pt.tgdeferrable, pt.tginitdeferred,
pp1.proname, pp2.proname, pc.oid,
pc1.oid, pc1.relname, pn.nspname FROM
pg_catalog.pg_class pc, pg_catalog.pg_proc
pp1, pg_catalog.pg_proc pp2,
pg_catalog.pg_trigger pt1, pg_catalog.pg_trigger
pt2, pg_catalog.pg_proc pp, pg_catalog.pg_trigger
pt, pg_catalog.pg_class pc1,
pg_catalog.pg_namespace pn , pg_catalog.pg_namespace pn1
WHERE pt.tgrelid = pc.oid AND pp.oid = pt.tgfoid AND
pt1.tgconstrrelid = pc.oid AND pp1.oid = pt1.tgfoid AND pt2.tgfoid =
pp2.oid AND pt2.tgconstrrelid = pc.oid AND
((pc.relname='CamposConfiguracao') AND (pn1.oid = pc.relnamespace) AND
(pn1.nspname = 'public') AND (pp.proname LIKE '%ins') AND (pp1.proname
LIKE '%upd') AND (pp2.proname LIKE '%del') AND
(pt1.tgrelid=pt.tgconstrrelid) AND (pt1.tgconstrname=pt.tgconstrname)
AND (pt2.tgrelid=pt.tgconstrrelid) AND
(pt2.tgconstrname=pt.tgconstrname) AND (pt.tgconstrrelid=pc1.oid) AND
(pc1.relnamespace=pn.oid))

-- Luiz Angelo Daros de Luca Federal University of Santa Catarina
Florianopolis - SC - Brazil luizd(at)inf(dot)ufsc(dot)br ICQ : 19290419 I Know,
"Where you wanted to go today", but I decided to stop here instead! MS
Windows

Attachment Content-Type Size
log.txt text/plain 11.8 KB

Responses

Browse pgsql-odbc by date

  From Date Subject
Next Message Steve Johnson 2003-08-15 16:45:09 FW: ERROR: Bad numeric input format '.' on insert or update of numeric column with a zero value
Previous Message Andre Felipe Machado 2003-08-13 20:33:56 app does not search for public schema qualifier