Re: [Q] 1. shared object 4GE 2. CREATE VIEW + UNION
Posted in 1996
}From: gis81566@cis.nctu.edu.tw (Lin FuXiong) }Date: 4 Oct 1996 11:26:21 GMT }X-Informix-List-Id: <news.28879> } }Hi, } I'm learning 4GL programming and have many questions. }I'll appreciate it if you can help me solve them. } }I'm using : }------------ }INFORMIX-OnLine Dynamic Server Version 7.10UC1 }SunOS 5.4 generic sun4m sparc }INFORMIX-4GL Version AH6.00.UE3 Thanks for the version information; it always helps. You appear to be using an ALS version -- presumably one that works with the Taiwanese version of Chinese. }Question 1. Dynamic linked 4GL executables ? }----------- } To know how the 'c4gl' compile a 'program', I wrote a testing }'program'. } }$cat t01.4gl }MAIN }END MAIN } }$c4gl t01.4gl -o t01.4ge } }$ls -l t01.4g? }-rwxr-xr-x 1 fxlin se 935464 Oct 4 18:54 t01.4ge }-rw-r--r-- 1 fxlin se 14 Oct 4 18:54 t01.4gl } }It contains 935k+ bytes!!! I know 'strip', but it still contains }853k+ bytes after stripped. How can I reduce its size? You should check whether using the -shared option (c4gl -o t01.4ge -shared t01.4gl) makes any difference. It probably will; if so, set the environment variable C4GLFLAGS to include "-shared" so that you will always link with shared libraries. If it doesn't, or if you get a message about shared libraries not being supported, then you (a) have a minor bug in the software as shared libraries should be supported on Solaris 2.4 (SunOS 5.4), and (b) there isn't much you can do about it until you get a release which does support shared libraries. The other alternative is to choose a language appropriate to the empty task you are doing, such as C: int main() { return(0); } which is a bit verbose when compared to the shell script: You did spot that it was an empty file...:-) }Question 2. Create a view with "UNION" ? }----------- } Is it possible to create a view with the function like union? }We have many databases located in different informix database servers. }Some tables in different servers have identical columns. We want to }create a view which will "UNION" them. } }For example: } } CREATE VIEW v01 AS } SELECT * FROM d01@server1.t01 } UNION } SELECT * FROM d01@server2.t01 } UNION } SELECT * FROM d01@server3.t01 } ... } }How can I do it ? You can't. ANSI SQL doesn't allow it, and Informix follows the standard a little too closely for comfort in this respect. Some other database systems provide an extension that does allow union views. I haven't checked whether the full SQL-92 standard allows union views; Informix only conforms to the entry level and that does not allow them. Yours, Jonathan Leffler (johnl@informix.com) #include <disclaimer.h>