Phoenix Rising wrote in post #962053:
> Hey fellas,
>
> I'm a MySQL to PostgreSQL "immigrant" due to Oracles fuсking MySQL in
> the ass lately, and I've migrated a Rails application successfully to
> PostgreSQL 9.

Welcome to the world of decent DBs!

>  However, when running migrations/tests, etc., I get a
> lot of notices similar to the following:
>
> NOTICE:  CREATE TABLE will create implicit sequence
> "private_messages_id_seq" for serial column "private_messages.id"
> NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index
> "private_messages_pkey" for table "private_messages"
>
> This is basically duplicated for each table that gets created.  I
> understand what it's doing - basically just letting me know that it's
> setting up a sequence for the primary key in each table.

Right.  PostgreSQL and MySQL handle autoincrements somewhat differently,
in that PostgreSQL has a separate sequence object for each
autoincrement.  So it's telling you that these objects are being
implicitly created even though you didn't directly ask for them.


>  That's all
> well and good, but it's goddamn annoying - how the hell do I turn
> these notices off?

Why?  Don't you want to know what the DB is doing?

> Additionally, is there something different I
> should be doing in my migrations?

No.  You could create the sequence objects explicitly, but there's no
need to.

> Usually notices are there to tell
> you that there's something you should be doing a little differently,

No.  These are *notices* (information), not warnings or errors.

[...]
>
> One last thing: how the hell do you correctly pronounce PostgreSQL?
> "Post-gray-sequel", "Post-gress", or something else?

The PostgreSQL FAQ covers this.

>  Additionally,
> what's the community's opinion in general on performance for PGSQL 9
> vs. MySQL 5.1? No holy wars here, please, just some constructive
> comparisons.

PostgreSQL is in general a much better database than MySQL.  It's
designed better (for example, I don't think something like PostGIS could
be written for MySQL), and they've focused on writing one storage engine
that actually works well, rather than doing the MySQL cheat of forcing
you to choose between speed (MyISAM) and transactional and referential
integrity (InnoDB).  PostgreSQL's syntax also tends to stick closer to
the ANSI standard, and if you need to write stored procedures, you have
your choice of languages (SQL, C, Ruby, Perl, even Lolcode) -- and the
procedural language actually works.  (Ever tried to write stored
procedures in MySQL?  The procedural language is a joke.)

PostgreSQL is a little harder to set up than MySQL, and I'm told that
clustering may not work as well, but I can think of few or no other
disadvantages.  I don't know why anyone still uses MySQL. :)

>
> Thanks :)

Best,
-- 
Marnen Laibow-Koser
http://www.marnen.org
mar...@marnen.org

Sent from my iPhone

-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to