Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • Your experiences I find astonishing. As a PostgreSQL user going back some 5 years, and recently asked to port my company's application to MySQL, I find MySQL to be unbelievably opaque. Funnily, I could mirror your complaints almost exactly:
    • Why is MySQL so hard to set up? Admittedly, I'm compiling from source in our environment, but PostgreSQL just compiles and installs. MySQL takes 3 times as long to compile, and installs a load of crap like tests that I'm not interested in, even when using the client only flag.
    • Why the heck am I allowed to connect without being attached to a database? What on earth purpose does it serve? It's just confusing.
    • Why is the SQL syntax so inconsistent? Why can't I have two timestamp columns with a default []? Why the heck should I care about setting the storage engine? To enabled something so fundamental as transactions, fer chrissake!
    • Why is the command line interface so appalingly bad? The help is non-existent on every instance I've connected to. psql at least gives you \h.
    • Why is the documentation for MySQL so bad? It's full of random gibberish about previous versions that I don't use and don't care about. It rarely seems to get to the point. In contrast with the PostgreSQL documentation, which I find clear and to the point.

    In summary, "Wah -- it's different to my comfy usualness!" from both of us.

    Anyway, to address some of your points:

    1. You can log in from localhost by default. Just over a Unix socket, not tcp/ip. It's exactly the same as using /tmp/mysql.sock. Just leave the hostname off whatever connect string you're using and it will connect to localhost.
    2. You don't have to su to postgres. Or rather, you only have to do it once: sudo -u postgres createuser -ad $LOGNAME. That'll give you your own superuser account and you won't have to use su at all.
    3. The documentation does have examples -- for example, see CREATE TABLE AS [].
    4. If you fancy a nicer interface, it's worth checking out pgAdmin [] or phppgadmin [].
    5. Yes, having to explicitly list all the permissions sucks, royally. I utterly agree with you on that point. :-)
    • MySQL is WAY easier to install - configure, make, make install - no creating and su'ing to a special user to create the databases.

      "Why is the command line interface so appalingly bad? The help is non-existent on every instance I've connected to. psql at least gives you \h."

      myql allows you to switch, and show databases, list and describe tables and best of all quit is quit and help is help. Table names and fields are tab completed. Postgresql is grumpy and unhelpful compared. The source command allows you to

      @JAPH = qw(Hacker Perl Another Just);
      print reverse @JAPH;
      • You can solve the pg_dump issue by grabbing the pg_dump from any 8.1.x version. It's been refactored to address the issue of not working between different versions.

        Slony is actually a robust replication mechanism for what it's worth. It doesn't handle schema updates all that well, but I don't think many replication systems do handle that well.

        There is at least one full text indexing system in the contrib tree with the source.

      • "myql allows you to switch, and show databases, list and describe tables and best of all quit is quit and help is help."

        Just like psql, apart from quit/help.

        "Table names and fields are tab completed."

        Maybe in your version. For me, psql completes, mysql doesn't. And it gets ^W wrong to add insult to injury.

        "The source command allows you to run sql scripts without exiting and piping."

        In psql it's spelled \i. Try \? for some help on the psql commands.

        "The SQL Prompt is far easier and more powerf

        • he last time I looked at PostgreSQL, I liked what I saw but the lack of reliable out-of-the-box replication was a showstopper. I was quite surprised that PostgreSQL was lagging behind MySQL & Oracle in that area. PostgreSQL for me therefore is fine for simple apps on a single database host, but once you move into something a little more advanced with multiple redundant database hosts sitting behind a load balancer, replication is a must have feature.

          I just had a quick peek at the online documentation
        • I have used pgAdmin on other people's machines, it's slower, ugly and contains less features than the equivilent tools for Oracle (Toad/Tora), MySQL (mysql-query-browser, mysq-admin) and SQL Server. PGaccess runs but lacks most of the features I'd want.

          Trying Squirrel, I found that it can't find the jdbc classes for anything and is slow, ugly and clunky - but thats Java's fault rather than Postgres :)

          @JAPH = qw(Hacker Perl Another Just);
          print reverse @JAPH;
    • I forgot my favourite bit of MySQL irritation: DBD::mysql doesn't support UTF-8 []. How long is it since Perl 5.6 came out now?