pg.ddx.io pgsql-performance@postgresql.org mailing list archive
help / color / mirror / Atom feed From: K C Lau <kclau60@netvigator.com>
To: pgsql-performance@postgresql.org
Subject: Re: indexes on primary and foreign keys
Date: Thu, 12 Jan 2006 11:49:16 +0800
Message-ID: <6.2.1.2.0.20060112103712.0529cdd0@localhost> (raw )
In-Reply-To: <BA99EEFA-8C9E-474E-A69B-62C354F53531@myrealbox.com >
References: <1b8a973c0601111438m3e0b1cc0hf9c387a4a1d6791d@mail.gmail.com >
<20060111232157.GA88829@winnie.fuhr.org >
<6.2.1.2.0.20060112083033.02bb74c8@localhost >
<BA99EEFA-8C9E-474E-A69B-62C354F53531@myrealbox.com >
At 09:26 06/01/12, you wrote:
>On Jan 12, 2006, at 9:36 , K C Lau wrote:
>
>>>NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index
>>>"cities_pkey" for table "cities"
>>
>>Is there a way to suppress this notice when I create tables in a
>>script?
>
>Set[1] your log_min_messages to WARNING or higher[2].
>
>[1](http://www.postgresql.org/docs/current/interactive/sql-set.html )
>[2](http://www.postgresql.org/docs/current/interactive/runtime-config-logging.html#RUNTIME-CONFIG-LOGGIN... )
>
>Michael Glaesemann
>grzm myrealbox com
Thanks. The side effect is that it would suppress other notices which might
be useful.
I was looking for a way to suppress the notice within the CREATE TABLE
statement but could not.
I noticed that when I specify a constraint name for the primary key, it
would create an implicit index with the constraint name. So may be if the
optional constraint name is specified by the user, then the notice can be
suppressed. Indeed the manual already says that the index will be
automatically created.
BTW, there's an extra space in link[2] above which I have removed.
Best regards,
KC.
view thread (9+ messages) latest in thread
Message-ID: <6.2.1.2.0.20060112103712.0529cdd0@localhost>
Permalink: ../6.2.1.2.0.20060112103712.0529cdd0@localhost/
Also on: postgresql.org/message-id/6.2.1.2.0.20060112103712.0529cdd0@localhost
copy link · copy postgr.es
reply Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: kclau60@netvigator.com
Subject: Re: indexes on primary and foreign keys
In-Reply-To: <6.2.1.2.0.20060112103712.0529cdd0@localhost>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox