Received: from id.godlike.com (id.godlike.com [206.205.199.129]) by hub.org (8.9.1/8.9.1) with ESMTP id TAA25891 for ; Sun, 15 Nov 1998 19:01:11 -0500 (EST) (envelope-from taral@cyberjunkie.com) Received: from taral ([208.247.20.138]) by id.godlike.com (8.8.5/8.8.5) with SMTP id TAA25724; Sun, 15 Nov 1998 19:01:04 -0500 (EST) From: "Taral" To: "Tom Lane" Cc: Subject: RE: [INTERFACES] IDL :) Date: Sun, 15 Nov 1998 18:01:04 -0600 Message-ID: <000801be10f4$33ea2480$8a14f7d0@taral.dobiecenter.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook 8.5, Build 4.71.2173.0 In-Reply-To: <23346.911172109@sss.pgh.pa.us> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3155.0 > We need some way of not having to enumerate all the possible field > datatypes in advance. [ suggestions snipped ] d) none of the above CORBA provides the "any" type, and it turns out that those discriminated unions are TERRIBLE memory hogs in C++. So see attached. There are now two files because some ORBs require a special switch to enable a type to be extracted from/represented by an "any". So now our user-defined types will have to work via the dynamic interfaces... someone explain to me how those types work! Taral --- cut here: pgsql.idl --- module PostgreSQL { // Discriminated unions removed due to inefficiency in C++ implementation typedef any Cell; typedef sequence Column; interface Row { typedef sequence type; attribute type data; // throws BAD_OPERATION on set until BE supports this }; interface QueryResult { typedef sequence type; typedef sequence headerType; readonly attribute headerType header; attribute type data; // throws BAD_OPERATION on set until implemented Row fetch(in long rownum); // returns nil or BAD_OPERATION until implemented // zero based numbering of rows }; interface Database { QueryResult exec(in string query); oneway void disconnect(); }; interface Server { Database connect(in string db, in string user, in string password); }; }; --- cut here: pgsql_types.idl --- // This file compiled for support of any for new types module PostgreSQL { enum celltype { int2, int4, int8 // more types }; typedef short int2type; typedef long int4type; struct int8type { long lsw; long msw; }; };