Hi,
thanks for the fast reply.

I think I crashed the daemon, the pl source is sent as attachment.
By the way the doc says:

vec3 := vector(vector('a', 'b'), vector(1, 2));  -- vector of vectors

Second-level elements of vec3 cannot be referenced as vec3[1][1].



On Tue, 13 Feb 2007 15:46:09 +0200, Mitko Iliev <[email protected]> wrote:

Hi,

If you have declared the user defined type (udt) to be 'self as ref' e.g.

create type testo as (val_int int) *self as ref*;

create type testi as (val_o testo);

then the assignments as :

self.val_o :=  new testo ();

self.val_o.val_int :=  x;

must work.

As for array[x][y] := val; this must be working too, in which case it
doesn't ?

Best Regards,
Mitko
Peter Filipov wrote:
Hi,

    Because it is open source and I miss a feature
I thought that with certain effort I may be able to implement what I need.
It turned out that the source is quite complicated and has too little
documentation(comments)
for me to understand what's going on.
    What I am trying to implement is 'inderect' assignment to an object
member /mutating the object/.
here is the pl code that I would like to work:

create constructor method testi(in a int) for testi {
--      declare b int;
        self.val_o:= new testo();
        self.val_o.val_int:=33;
--      self.val_int:= 33;
--      self.val_int:=a;        
--      b:=a;
}
;

It is the 'self.val_o.val_int:=33;' line that I would like to make work.
I would like also tho make the assignment to multidimensional arrays
working:
testarr[1][2]:=3;

I think the way to fulfill this is to hack the pl compilation/execution
code,
but as I said it looks too complicated and too little documented to me.
(The postgres pl code seems a little more comprehensible to me, but this
is another matter)
    So can you give me any sources of documentation?
    Or can you give me any advice how to handle the problem?

The multistep assignment is not an option i think cause it will come out
to be too slow for execution
and too tedious to write each time.

I suppose that the feature may be not sql/pl(whatever) standards compliant
but i think it is usable if
one wishes to have more code in pl.

Best Regards,
samoaz







--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

Attachment: crash.client.log
Description: Binary data

Attachment: crash.server.log
Description: Binary data

Attachment: locasg.sql.caused.segmentationfault.sql
Description: Binary data

Reply via email to