# How do you turn off notices using PostgreSQL 9?

**URL:** <https://www.ruby-forum.com/t/how-do-you-turn-off-notices-using-postgresql-9/199246>\
**Category:** Rails\
**Created:** [November 17, 2010, 8:29am UTC](https://www.ruby-forum.com/t/how-do-you-turn-off-notices-using-postgresql-9/199246 "2010-11-17T08:29:42Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![okkezSS](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/85f322/32.png) [@okkezSS](https://www.ruby-forum.com/u/okkezSS)\
**Post date:** [November 17, 2010, 8:29am UTC](https://www.ruby-forum.com/t/how-do-you-turn-off-notices-using-postgresql-9/199246/1 "2010-11-17T08:29:42Z")

</div>

Hey fellas,

I’m a MySQL to PostgreSQL “immigrant” due to Oracles fucking MySQL in  
the ass lately, and I’ve migrated a Rails application successfully to  
PostgreSQL 9. 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. That’s all  
well and good, but it’s goddamn annoying - how the hell do I turn  
these notices off? Additionally, is there something different I  
should be doing in my migrations? Usually notices are there to tell  
you that there’s something you should be doing a little differently,  
and I realize that database agnosticism or not, there are going to be  
some tangible differences between MySQL and PostgreSQL. Is there  
something I need to do in my migrations to explicitly state that there  
needs to be a sequence generated on the ‘id’ field so that it doesn’t  
feel that it needs to toss out these notices?

One last thing: how the hell do you correctly pronounce PostgreSQL?  
“Post-gray-sequel”, “Post-gress”, or something else? 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.

Thanks 🙂

---

<div class="post-metadata">

**Author:** ![Phoenix\_R](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/5e9695/32.png) [@Phoenix\_R](https://www.ruby-forum.com/u/Phoenix_R)\
**Post date:** [November 17, 2010, 8:55am UTC](https://www.ruby-forum.com/t/how-do-you-turn-off-notices-using-postgresql-9/199246/2 "2010-11-17T08:55:26Z")

</div>

database.yml:

test:  
adapter: postgresql  
database: dbname\_test  
username: username  
min\_messages: warning #magic sauce  
host: localhost  
encoding: UTF8

~Larry

---

<div class="post-metadata">

**Author:** ![Phoenix\_R](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/5e9695/32.png) [@Phoenix\_R](https://www.ruby-forum.com/u/Phoenix_R)\
**Post date:** [November 17, 2010, 9:04am UTC](https://www.ruby-forum.com/t/how-do-you-turn-off-notices-using-postgresql-9/199246/3 "2010-11-17T09:04:52Z")

</div>

Dear Larry,

You rock. That is all. 🙂

- Phoenix

(Thanks dude, it’s appreciated!)

---

<div class="post-metadata">

**Author:** ![Phoenix\_R](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/5e9695/32.png) [@Phoenix\_R](https://www.ruby-forum.com/u/Phoenix_R)\
**Post date:** [November 17, 2010, 3:09pm UTC](https://www.ruby-forum.com/t/how-do-you-turn-off-notices-using-postgresql-9/199246/4 "2010-11-17T15:09:10Z")

</div>

Phoenix R. 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

> **[marnen.org: Homepage of Marnen Laibow-Koser](https://marnen.org/)**

[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

Sent from my iPhone

---

<div class="post-metadata">

**Author:** ![Phoenix\_R](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/5e9695/32.png) [@Phoenix\_R](https://www.ruby-forum.com/u/Phoenix_R)\
**Post date:** [November 17, 2010, 3:10pm UTC](https://www.ruby-forum.com/t/how-do-you-turn-off-notices-using-postgresql-9/199246/5 "2010-11-17T15:10:01Z")

</div>

On Nov 17, 2:28 am, Phoenix R. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> One last thing: how the hell do you correctly pronounce PostgreSQL?  
> “Post-gray-sequel”, “Post-gress”, or something else? 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.
> 
> Thanks 🙂

I understand the etymology to be Post-Ingres-SQL so I always say it as  
post-gres-Q-L. Wikipedia says it sounds like this: /ˈpoʊstɡrɛs ˌkjuː  
ˈɛl/. The [postgresql.org](http://postgresql.org) website has survey results on the matter:  
[http://www.postgresql.org/community/survey.33.html](http://www.postgresql.org/community/survey.33.html).
