[LRUG] Reasons for Postgres

Jocke Selin jocke at selincite.com
Tue Nov 17 00:53:48 PST 2009


Sam,

Thanks for those examples - they make me shrug and I really don't like the microsoftism where the software quietly in the background is "helping" the user. Usually ending up in unexplained behaviour that you can't trace down within a sane mindset.

Think I'll have another coffee and and think zen-like thoughts. ;)

/Jocke

On 17 Nov 2009, at 01:39, Sam Stokes wrote:

> Jocke Selin wrote:
>> Those commands create and run the SQL for you.
> 
> Thanks Jocke, createdb and createuser do look a lot easier to get started with!
> 
> Mark Blackman wrote:
> » ...
>> I'd say the key thing about Postgres for me is that it feels very predictable, where MySQL always seemed to surprise me with what felt
>> like very odd behaviours and it's never seemed slow. The only genuine
>> drawback to Postgres that I've ever found, was more replication technology options for MySQL
> 
> Here's one example I'd heard about before, and just tried.
> 
> CREATE TABLE badger(foo INT);
> INSERT INTO badger(foo) VALUES('2a');
> INSERT INTO badger(foo) VALUES('2.5');
> 
> In PostgreSQL, both INSERTs fail with "ERROR: invalid input syntax for integer".
> 
> In MySQL, the first INSERT succeeds with a warning, with foo = 2 (i.e. dropping the unparsed input).  The second INSERT succeeds without any warning, with foo = 3 (i.e. *rounding* the input).
> 
> Silent type coercion?  What is this, Javascript?
> 
> More scarily,
> 
> CREATE TABLE mushroom(bar VARCHAR(1));
> INSERT INTO mushroom(bar) VALUES(10);
> 
> PostgreSQL refuses to do the insert.  MySQL does it with a warning... setting bar = "1"!
> 
> Another annoyance I've had with MySQL is that its TIMESTAMP type silently truncates down to 1-second precision.
> 
> -- 
> Sam
> _______________________________________________
> Chat mailing list
> Chat at lists.lrug.org
> http://lists.lrug.org/listinfo.cgi/chat-lrug.org

Jocke Selin - jocke at selincite.com - http://jocke.selincite.com/







More information about the Chat mailing list