Re: [gnome-db] Introspection - DataModel structures



On Thu, 2004-04-08 at 21:14 +0200, Murray Cumming wrote:
> I think we are meant to use gda_connection_get_schema() to discover what
> tables exist, and to discover the structure of those tables. But this
> just returns a regular DataModel.
> 
> With postgresql, I find that the first column contains the field name,
> and the 2nd contains the data type [1], but I wonder whether this is
> part of libgda or just a structure that libgda is passing to me directly
> from postgres? Is this documented or standardised? Should I expect to
> get the same structure for every provider?
> 
> [1]: For instance, this is the output of my test program when using
> postgresql:
> 
> Number of tables: 1
>   Table name: tbltest1
>     Number of columns for field information: 9
>       column 0: Field name
>       column 1: Data type
>       column 2: Size
>       column 3: Scale
>       column 4: Not null?
>       column 5: Primary key?
>       column 6: Unique index?
>       column 7: References
>       column 8: Default value
>     Number of fields: 2
>       Field Name: col1
>       Data Type: bpchar
>       Field Name: col2
>       Data Type: int4
> 
> 
yes, all providers should be returning the same info. If they're not,
it's a bug. So this is not PostgreSQL-specific. In fact, it is
documented on the docs.

cheers




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]