Re: youtube video on pgsql integrity - Mailing list pgsql-general

From Gavin Flower
Subject Re: youtube video on pgsql integrity
Date
Msg-id 50B7B1F5.8070908@archidevsys.co.nz
Whole thread Raw
In response to Re: youtube video on pgsql integrity  (Chris Angelico <rosuav@gmail.com>)
List pgsql-general
On 30/11/12 04:30, Chris Angelico wrote:
On Fri, Nov 30, 2012 at 2:00 AM, Ray Stell <stellr@vt.edu> wrote:
On Nov 29, 2012, at 9:27 AM, Kevin Grittner wrote:
is everything shown there really
the behavior of the MySQL database itself?
Good question.  I intend to install mysql one day to explore, but just can't find the time.  The particular engine is not disclosed and I've read some are better than others....
Far as I can see, none of the behaviour show there is the front end
(other than UI features like autocomplete). You should be able to
replicate everything demonstrated in that vid using any MySQL client.

I like his quoting of the error messages. MySQL: now()/0 -> NULL;
PostgreSQL: now()/0 -> "dude, what are you doing".

With at least some of the invalid-data-gets-modified examples, you can
tell MySQL to be more strict about things. However, the typical use of
MySQL is with those sorts of settings at their defaults. See:
http://dev.mysql.com/doc/refman/5.0/en/server-sql-mode.html and note
that an application is always free to violate any of those rules it
likes.

PostgreSQL puts the responsibility on the database schema designer and
the database admin; MySQL puts the responsibility on the application
developer. PostgreSQL builds a database and lets applications talk to
it; MySQL lets an application store its data. There's a huge
philosophical difference there.

ChrisA


$ psql
psql (9.2.1)
Type "help" for help.

gavin=> SELECT now()/0;
ERROR:  operator does not exist: timestamp with time zone / integer
LINE 1: SELECT now()/0;
                    ^
HINT:  No operator matches the given name and argument type(s). You might need to add explicit type casts.
gavin=>




Cheers,
Gavin

pgsql-general by date:

Previous
From: Igor Neyman
Date:
Subject: Re: pg_listening_channels()
Next
From: Igor Neyman
Date:
Subject: Re: set value var via execute