agora inbox for postgres@postgres.berkeley.edu
help / color / mirror / Atom feedFrom: Bruce Taneja. <aataneja@cs.mtu.edu>
To: postgres@postgres.Berkeley.EDU
Cc: Bruce Taneja. <aataneja@cs.mtu.edu>
Subject: complex data types ..
Date: Thu, 26 May 1994 00:28:45 -0400 (EDT)
Message-ID: <9405260428.AA02346@cs.mtu.edu> (raw)
Is there a way to call the user-defined-data-type functions
in the data types that use those simpler data types .. ;=) example follows:
******************
/* from pyramid.c
A pyramid is constructed out of a base circle and a point at certain
height above the center of the circle */
******************
typedef struct{
CIRCLE c;
double height;
} PYRAMID;
******************
/* intended input format:
create table-x (pyramid1 = pyramid) \g
append to table-x (pyramid1 = "(2, (3.0, 1.1, 2.1))" )
please doing worry about syntax errors ;), following is the crux: */
******************
PYRAMID pyramid_in (str)
char * str
{
pyramid * result ;
/* BLAH - BLAH parser */
result->height = atof (etc "2");
******************
/* *** now how in the world do I call the circle_in function (parser) here
and let it parse the rest of the "(3.0, 1.1, 2.1)" from above append ..
One simple way would be to go result->c.center.x= .. , result->c.radius=... etc
but I do NOT want to do this .. !! .. knowing some way of calling parsers
from sub-data-types will help tremendously parsing data at higher level of
nestings .. */
******************
Q.2 does some body know at how many nested levels of complex data types
does postgres becomes unstable ... ?????
Q.3 Can we use nested structs within a single new-data.c file (like circle.c)
******************
thanks a lot folks for listening in, hope u know more that I do !
Bruce!
==============================================================================
To add/remove yourself to/from the POSTGRES mailing list: send mail with
the subject line ADD or DEL to "postgres-request@postgres.Berkeley.EDU"
If this fails, send mail to "post_questions@postgres.Berkeley.EDU" and
a human will deal with it. DO NOT post to the "postgres" mailing list.
==============================================================================
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: postgres@postgres.berkeley.edu
Cc: aataneja@cs.mtu.edu
Subject: Re: complex data types ..
In-Reply-To: <9405260428.AA02346@cs.mtu.edu>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox