Page 1 of 1

Enable Composites.

Posted: Mon 20 Apr 2009 09:26
by yapt
Hello,

I must doing something wrong but 'EnableComposites = true' on PgConnection is NOT creating separate fields for every type on composite.

I have the simplest example:

SELECT ROW(1.67, 'text', 2.45) AS tttotal

I can select tttotal field on a dbedit, but I cannot access to subfields in the row (I don't know how to do it).

Can sombody point me in the right direction ?

Greetings.

Posted: Tue 21 Apr 2009 07:03
by Plash
EnableComposites works only for named composite types. If you have a field of composite type in your table, and select this field, subfields will be created.

Posted: Tue 21 Apr 2009 09:18
by yapt
Ok, then composites automatic sub-fields creation doesn't work on "on the fly" composite create (on SELECT's for example).

Do you have any roadmap to support this ?

Thanks.

Posted: Tue 21 Apr 2009 11:19
by Plash
We cannot get information about subfields of such composite. So we will not support subfield creation for it.

Posted: Tue 21 Apr 2009 11:40
by yapt
Perhaps simply doing an index for every sub-field ?

Greetings.

Posted: Tue 21 Apr 2009 11:57
by Plash
Field count and datatypes are not fixed, and can differ between records. For example:

Code: Select all

select row(1,2,3,4,5)
union all
select row(1,'abc',3)
The first record has 5 subfields, the second record has 3 subfields.

Posted: Tue 21 Apr 2009 12:10
by yapt
Ok. Understand it..

Thanks Plash. Your help is very appreciated.