Re: [gnome-db] Patch for postgres provider



On Mon, 2002-03-11 at 00:52, Gonzalo Paniagua Javier wrote:
> > > +	nrows = PQntuples (pg_res);
> > > +	td = g_new0 (GdaPostgresTypeOid, nrows);
> > > +	for (i = 0; i < nrows; i++) {
> > > +		td[i].name = g_strdup (PQgetvalue (pg_res, i, 1));
> > > +		td[i].oid = atoi (PQgetvalue (pg_res, i, 0));
> > >  	}
> > heh, very nice way to deal with this. But, could you retrieve more info
> > from the types? That is, in the SCHEMA_TYPES, right now we are just
> > getting the names of the types, but we are going to extend this and get
> > extra information. So, it would be nice if you could store as much info
> > as possible in td[].
> 
> 	This data is used in the recordsets resulting from the
> 	connection just to map gda <-> postgres types. 
> 
> 	The data for SCHEMA_TYPES uses this mapping but gets its data
> 	from another query (see the still-unfinished
> 	gda_postgres_fields_metadata()).
> 
ok, perfect

> [...]
> > > -	type_list = get_connection_type_list (pconn);
> > > -	if (type_list == NULL) {
> > > +	priv_data = g_new0 (GdaPostgresConnectionPrivate, 1);
> > > +	priv_data->pconn = pconn;
> > > +	if (get_connection_type_list (pconn, priv_data) != 0) {
> > >
> > if priv_data->pconn is already set to 'pconn', why do you need both
> > parameters in the call to gda_connection_type_list?
> 
> 	Wow! When you review code, you REALLY do it! Again, you are
> 	right.
> 
heh, so why do you send the patches if you don't expect me to review it?
:-)

cheers
-- 
Rodrigo Moya <rodrigo gnome-db org> - <rodrigo ximian com>
http://www.gnome-db.org/ - http://www.ximian.com/



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