Postgres migration notices

When I run “rake” using a postgres 8.1 database, I get a bunch of these
notices.

NOTICE: CREATE TABLE will create implicit sequence
“categories_id_seq” for serial column “categories.id”
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index
“categories_pkey” for table “categories”

How can I avoid those? I take it I need to modify the migrations.

Thanks,
Joe

On Fri, 2006-07-14 at 00:10 -0700, Joe Van D. wrote:

When I run “rake” using a postgres 8.1 database, I get a bunch of these notices.

NOTICE: CREATE TABLE will create implicit sequence
“categories_id_seq” for serial column “categories.id”
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index
“categories_pkey” for table “categories”

How can I avoid those? I take it I need to modify the migrations.


funny, I always considered it a form of being loved.

The message is merely informational since what it is telling you is that
it not only is creating an ‘id’ column in your postgresql table but also
setting an explicit sequence for that table which will automatically
increment the ‘id’ entries. Without this sequence, ActiveRecord could
not manage adding new records to the table without some other form of
programmer assistance.

There’s no problem, that is the way things are supposed to be

Craig

On Jul 14, 2006, at 12:10 AM, Joe Van D. wrote:

When I run “rake” using a postgres 8.1 database, I get a bunch of
these notices.

NOTICE: CREATE TABLE will create implicit sequence
“categories_id_seq” for serial column “categories.id”
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index
“categories_pkey” for table “categories”

How can I avoid those? I take it I need to modify the migrations.

For your app - config/database.yml
development:
adapter: postgresql
min_messages: warning

Globally - edit postgresql.conf
client_min_messages = warning

jeremy

On Jul 14, 2006, at 2:10 , Joe Van D. wrote:

How can I avoid those? I take it I need to modify the migrations.

They’re NOTICES, not ERRORs. They’re just there to let you know
what’s going on. You can freely ignore them. If you really don’t want
to log them, you can set log_min_messages to a higher threshold
(ERROR or WARNING) in your migrations, or even in postgresql.conf to
set it globally.

Here are some links to the PostgreSQL documentation for more details
(note that I munged these links while offline, so they may not be
exactly right, but hopefully they’ll point you in the right direction)

http://www.postgresql.org/docs/current/interactive/runtime-config-
logging.html#RUNTIME-CONFIG-LOGGING-WHEN

Michael G.
grzm seespotcode net