pierdeux Power User

Joined: 08 Mar 2006 Posts: 51
|
Posted: Wed Mar 08, 2006 8:15 pm Post subject: OOoBase and composite types |
|
|
I am using OOoBase as a client front-end of a PostrgreSQL (8.1.2) server. The driver between the two is the PostgreSQL JDBC driver.
A column in one of my tables in PostgreSQL is a composite type made up of two components: (date, integer). I know that the JDBC driver is capable of handling these. But OOoBase only sees these columns as "object types". I am presuming that OOoBase knows nothing about composite types (at least, I have read nothing that led me to believe anything else...).
I am not too familiar with the different ways by which a form can query or update table information. For instance, I've noticed that the "list box" object could handle data in six ways: Valuelist, Table, Query, SQL, SQL [Native] and Tablefields. But so far I've only used the Valuelist technique.
So, I am wondering:
Is there a way, through some SQL magic, to query the two components of my composite type and have them appear separately in two different form fields in OOoBase: a date field and an integer field?
Can I keep the link between these two fields and the original composite type, so that a change in those fields will make its way to an updated value in the composite type of the database?
I'd even be willing to use internal functions and triggers! (But I'd rather not change the structure of my tables: their structures correspond to the structure of the problem at hand, and I'd rather the software adapted to that than the structure adapting to the software!)
(My initial thought had been to create a view in which the composite types appeared as separate columns, but of course that's no use since views are not updateable in PostgreSQL!) |
|