[Gambas-user] Gambas2 components?

Gareth Bult gareth at ...1689...
Thu Jan 15 01:48:07 CET 2009


>>1) How can you know that we should use MySQL if you have used MySQL only?

I couldn't, I have however tried (over the years) the other DB's mentioned, PG in particular.
I just choose "not" to use any of them commercially given the availability of MySQL.

Once upon a time I was an Ingres user .. 6 users on a VAX 780 .. memories of SELECTING 1 record from a small 20 record table taking minutes ... ;-)   [pg being an evolution if Ingress.. ;-) ]

More recently I've used PG with TinyERP .. not a smooth ride.

>>2) The MySQL C API is, hem... strange. Let be politically correct there.

I tend to access from Python (or Gambas), hence don't find that a problem .. ;-)

>>3) Why did they change their timestamp format suddenly?

Mmm, don't know. Not something that I've noticed .. but then I don't do a vast amount with timestamps ...

>>4) There is no difference between a BLOB and a large TEXT field.

Urm, really?
I was under the impression that Blobs were binary strings and Text's were character set based?
(i.e. TEXT's support collation and BLOB's don't)
[or is this a bug you're aware of ?]

>5) MySQL only get features recently that PostgreSQL had for years.

Not strictly true, version 5.0 has been around for a LONG time, GA was back in 2005 (!)
(and it was available long before that!)

.. before you say "but it was 'beta' before that ... in those days MySQL beta's could wipe the floor with PG releases in terms of reliability (!) ..  ;-)

>6) David Villalobos Cambronero got an error message from mysql. I have no idea 
>at all where it comes from. Maybe it is gb.db.mysql fault there, but it makes 
>me angry. :-)

Is this the "commands out of order" error?

If it is, might be worth checking his setup before your code .. unless it's code you've been changing.
I *think* I remember seeing this problem quite some time ago as a result of communications problem .. I'm sort of guessing at the actual issue (as it was a while ago) but I think we were playing with IP failover at the time and the IP of the SQL server was flipping to an alternative SQL server mid-query. From memory it was a pig to trace as once it had flipped (and we'd not noticed) the same query would then run fine .. until we experienced another flip mid-query .. but I might be mixing up incidents ... point being if that could cause it, other environmental / comms issues might also cause the problem.

Anyway, I know what you mean, but such it the nature of client - server programming (!)

>And I don't talk about sticking the word "standard" with "SQL"...

Well .. a lot of it is standard .. it's just all the bits that people found they needed after they issued ANSI SQL92 ;-)

That said, 6.x is supposed to be fully ANSI once you turn on all the --ansi flags ... not sure whether that disables MySQL specific extensions like last_insert_id() tho'...

Apparently in postgres you need to have a field of type serial (or big serial) [rather than int] and the following code;

SELECT CURRVAL(pg_get_serial_sequence('table','column'));
[where column is the column of type 'serial']

Shouldn't be 'too' hard to implement (?) .. but using a different data type is a bit of a nuisance ..

Gareth.


----- Original Message -----
From: "Benoit Minisini" <gambas at ...1...>
To: "mailing list for gambas users" <gambas-user at lists.sourceforge.net>
Sent: Wednesday, 14 January, 2009 11:44:22 PM GMT +00:00 GMT Britain, Ireland, Portugal
Subject: Re: [Gambas-user] Gambas2 components?

On jeudi 15 janvier 2009, Gareth Bult wrote:
> Mmm,
>
> I wouldn't know "how" to do what GridEditor does without autoinc fields and
> last_id .. if other DB's make this difficult or don't provide the
> functionality, that sort of reinforces my suggestion that one should choose
> MySQL.
>
> Just turning it around for a second, is there any reason why one should
> *not* use MySQL?
>
> As a 10yr+ MySQL user, my views may be biased, however to the best of my
> knowledge; a. MySQL is faster than the competition, certainly the likes of
> Postgres (by a lot!) b. MySQL does not crash - so it's reliability is not
> question
> c. Current versions support all the stuff (triggers, stored proc's etc)
> that people used to insist was their excuse for Postgres d. MySQL does
> loads of back end replication stuff other DB's don't do e. MySQL runs on
> more Platforms than any other DB
> f. It has bindings for every language I can think of, and then some
> g. It has loads of nice GUI tools and designers (commercial and free)
> .. etc .. etc .. etc ...
>
> yes I do have the T-shirt, but no they're not paying me.
>
> Bottom line, I have no reason why GridEditor should not support other DB's
> , just so long as they can actually do the job .. so as soon as people with
> the relevant expertise provide Gambas with autoinc / lastid support, I'll
> see if I can use it in place of a raw SELECT statement .. how's that ?  
> :-)
>
> Gareth.
>

1) How can you know that we should use MySQL if you have used MySQL only?

2) The MySQL C API is, hem... strange. Let be politically correct there.

3) Why did they change their timestamp format suddenly?

4) There is no difference between a BLOB and a large TEXT field.

5) MySQL only get features recently that PostgreSQL had for years.

6) David Villalobos Cambronero got an error message from mysql. I have no idea 
at all where it comes from. Maybe it is gb.db.mysql fault there, but it makes 
me angry. :-)

Not that PostgreSQL is perfect, far from that. The only clean database API I 
know is the SQLite one. The funny thing in Gambas is that the gb.db.sqlite 
component (sorry Niggel!) has used a crappy C++ layer on top! 

And I don't talk about sticking the word "standard" with "SQL"...

-- 
Benoit Minisini

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Gambas-user mailing list
Gambas-user at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

-- 
Managing Director, Encryptec Limited
Tel: 0845 5082719, Mob: 0785 3305393
Email: gareth at ...1689... 
Statements made are at all times subject to Encryptec's Terms and Conditions of Business, which are available upon request.




More information about the User mailing list