pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Rob Sargent <robjsargent@gmail.com>
To: A. Kretschmer <andreas.kretschmer@schollglas.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Avoiding "will create implicit index" NOTICE
Date: Thu, 11 Jun 2009 10:05:39 -0600
Message-ID: <4A312B53.7010000@gmail.com> (raw)
In-Reply-To: <20090611073106.GB16593@a-kretschmer.de>
References: <4A242CC4.5000400@obviously.com>
	<5c4ddc540906011321v2162f928v451cca8833a44e20@mail.gmail.com>
	<4A30A239.8080700@obviously.com>
	<4A30AC42.1060709@obviously.com>
	<20090611073106.GB16593@a-kretschmer.de>

A. Kretschmer wrote:
> In response to Bryce Nesbitt :
>   
>> Hmm, no.  I still get the NOTICE. How can I create the primary key
>> without triggering a NOTICE?
>>     
>
> Sure, set client_min_messages='...'
>
> test=*# create table bla(id int primary key);
> NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "bla_pkey" for table "bla"
> CREATE TABLE
> test=*# rollback;
> ROLLBACK
> test=# set client_min_messages='warning';
> SET
> test=*# create table bla(id int primary key);
> CREATE TABLE
> test=*#
>
>
> Andreas
>   
Funny thing is I'm using set client_min_message in my own scripts!

Also was assuming OP was in a scripting/temp-table mode and that the 
notion of explicit primary key (vs. simply stating the index) isn't of 
great value in that realm I don't think.




view thread (6+ messages)

Message-ID: <4A312B53.7010000@gmail.com>
Permalink:  ../4A312B53.7010000@gmail.com/
Also on:    postgresql.org/message-id/4A312B53.7010000@gmail.com

 · 

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-sql@postgresql.org
  Cc: robjsargent@gmail.com, andreas.kretschmer@schollglas.com
  Subject: Re: Avoiding "will create implicit index" NOTICE
  In-Reply-To: <4A312B53.7010000@gmail.com>

* 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