[Mono-list] Which postgres client library?

yoros@wanadoo.es yoros@wanadoo.es
Thu, 8 May 2003 19:06:35 +0200


On Thu, May 08, 2003 at 12:09:40PM -0400, Stuart Ballard wrote:
> yoros@wanadoo.es wrote:
> >
> >I've been using Npgsql and it is working pretty good. With that words he
> >means that it is not full-implemented and it is not tested to work in
> >all ways. I have a few table access (select, insert, update) and it
> >works right for me.
> 
> Are you using query parameters at all? I ask because as far as I can 
> tell they're completely botched in the release that comes with Mono 
> 0.24. Here's an excerpt from the Npgsql log file that I turned on (kudos 
> to the Npgsql developers for that awesome feature!)
> 
> --- Begin log excerpt ---
> 05/08/2003 11:56:45  3199  Debug  Query sent: insert into 
> "core_compass_site" ("name", "title", "description", "keywords", 
> "show_module_titles", "current_revision_id", "pending_revision_id") 
> values (TestSite, A test site, , , False, 0, 0)
> --- End log excerpt ---
> 
> Clearly, the bit after "values (" isn't *remotely* valid SQL. The SQL 
> string I specified had "values (:name, :title, :description, " etc, and 
> then I bound those parameters to the values "TestSite", "A test site", 
> DBNull.Value, etc. Obviously those should at LEAST be quoted before 
> sending them to the server, or better yet, not sent in the literal 
> string at all, but actually transmitted as parameters.
> 
> It clearly *is* sending it as a literal string, because the next thing 
> that happens is an error along the lines of "parse error near 'test'".
> 
> The Npgsql webpage 
> (http://gborg.postgresql.org/project/npgsql/projdisplay.php) seems to 
> suggest that parameters are working okay (look in the right-hand 
> column), but the behavior I'm seeing is nowhere near okay - is Mono 
> shipping an old version by any chance?
> 
> Anyone know if Mono.Data.PostgreSqlClient works any better, and whether 
> there's any docs on it anywhere?

Hi Stuart,

The best docs you have are the ChangeLog files and the source code of
each provider. I've never used query parameters. I don't know how can I
use them (I never liked it), ¿can you send an example, please?

I think that the CVS of Npgsql is Mono sice a few months.

See you,

    Pedro

-- 
Pedro Martínez Juliá
\  yoros@terra.es
)|    yoros@wanadoo.es
/        http://yoros.cjb.net
Socio HispaLinux #311
Usuario Linux #275438 - http://counter.li.org
GnuPG public information:  pub  1024D/74F1D3AC
Key fingerprint = 8431 7B47 D2B4 5A46 5F8E  534F 588B E285 74F1 D3AC