From: | "Taral" <taral(at)cyberjunkie(dot)com> |
---|---|
To: | "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | <pgsql-interfaces(at)hub(dot)org> |
Subject: | RE: [INTERFACES] IDL :) |
Date: | 1998-11-16 00:01:04 |
Message-ID: | 000801be10f4$33ea2480$8a14f7d0@taral.dobiecenter.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-interfaces |
> 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<Cell> Column;
interface Row {
typedef sequence<Cell> type;
attribute type data; // throws BAD_OPERATION on set until BE
supports this
};
interface QueryResult {
typedef sequence<Column> type;
typedef sequence<string> 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;
};
};
From | Date | Subject | |
---|---|---|---|
Next Message | Taral | 1998-11-16 00:33:55 | MICO |
Previous Message | Tom Lane | 1998-11-15 23:21:49 | Re: [INTERFACES] IDL :) |