Re: Seeing SYNONYM's Listed as Tables
Posted in 1997
>From: roger@stratsoft.com (Roger Meyers)
>Date: Mon, 27 Jan 1997 16:44:39 GMT
>X-Informix-List-Id: <news.33058>
>
>I am accessing Informix (On-Line V5) from Powerbuilder, but I suspect
>this question would apply to any tool that graphically generates
>SQL... (NewEra?)
Most probably...
>I want to use SYNONYM's to make tables in other databases (and other
>machines) appear as if they are in the current database so that PB can
>access them.
OK.
>This works when I type embedded SQL, but the graphical
>SQL painter doesn't see them. Very limiting.
Not helpful.
>I suspect this is a PB problem, but I notice that Informix's dbaccess
>doesn't show them either.
Presumably you are referring to DB-Access and the Table/Info or Query/Info
menus? Even in the 7.2x version, it only shows tables (real tables), and
views, but not synonyms.
I suspect that the reason is related to the way that synonyms are
represented in the system catalogue. Tables and views have entries in both
SysTables and SysColumns, whereas synonyms only have an entry in SysTables
(and SysSynTable). This means that you have to use a different mechanism
to get hold of the information about the columns (and indexes, and ...).
I am almost sure that this is why PB has problems.
>Does anyone know of an option that makes SYNONYMs visible to informix
>tools?
Well, you can try creating a view on the synonym:
CREATE VIEW v_synonym AS SELECT * FROM SynonymName;
This view shows up in DB-Access Table/Info, with all the necessary data
in SysColumns too.
>Do the later versions of Informix handel SYNONYMS differently?
I don't have a Liszt of changes -- in fact, I don't think there are
any significant changes between version 5 and version 7 in the handling
of synonyms. Bach in the good old days of 4.x and earlier, synonyms were
recorded in SysSynonyms, but that was before inter-database synonyms were
allowed at all:-)
Yours,
Jonathan Leffler (johnl@informix.com) #include <disclaimer.h>