Re: [gnome-db] libgda-1.0.3/libgnomedb-1.0.3 - some observations and a question



On Mon, 2004-04-12 at 02:02 -0600, Denis Loginov wrote:
> Hi,
> 
> 1. As I reported before, the Postgres provider seems to have an error in
> get_postgres_fill_md_data (used for
> gda_connection_get_schema/GDA_CONNECTION_SCHEMA_FIELDS) - it returns TRUE
> in that column if the field IS NULL, not NOT NULL. I don't know whether
> this was taken care of in the later versions as nobody answered, so here's
> the diff that is supposed to fix it:
> === (gda-postgres-provider.c.diff)
> 
> 1659c1659
> < 			"(SELECT a.attname, b.typname, a.atttypmod, b.typlen, not a.attnotnull, d.adsrc, "
> ---
> > 			"(SELECT a.attname, b.typname, a.atttypmod, b.typlen, a.attnotnull, d.adsrc, "
> 1664c1664
> < 			"UNION (SELECT a.attname, b.typname, a.atttypmod, b.typlen, not a.attnotnull, NULL, "
> ---
> > 			"UNION (SELECT a.attname, b.typname, a.atttypmod, b.typlen, a.attnotnull, NULL, "
> 1671c1671
> < 			"SELECT a.attname, t.typname, a.atttypmod, t.typlen, not a.attnotnull, d.adsrc, a.attnum "
> ---
> > 			"SELECT a.attname, t.typname, a.atttypmod, t.typlen, a.attnotnull, d.adsrc, a.attnum "
> ===
>
could you please send this patch as an attachment, in unified form (cvs
-z3 diff -u) and with a ChangeLog entry? Hope it's not asking too
much :-)

> The MySQL provider doesn't have such reversal, so I suppose this is a bug
> rather than a feature.
> 
> 2. If I create a command out of a query that ends with ';', it works fine
> with Postgres provider, but returns an error "Error 1065: Query was empty"
> with MySQL provider, which seems to be the result of sending an empty
> string after splitting the original SQL command in
> gda-mysql-provider.c:318 . Seems like the same empty command is being sent
> to Postgres in Postgres provider, but Postgres does not return an error in
> response. So the whole thing seems a bit unclear and I wonder if something
> should be done to prevent sending the empty strings to the RDBMS rather
> than memorizing that there must be no ';'s at the end of the requests.
> 
right, shouldnt a simple check for the empty string be enough?

> 3. Is there or should there be a way to find out whether a field is
> serial/auto_increment?
>
hmm, good question. What would be the best way?

cheers




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