Re: Avoiding "will create implicit index" NOTICE - Mailing list pgsql-sql

From Rob Sargent
Subject Re: Avoiding "will create implicit index" NOTICE
Date
Msg-id 4A312B53.7010000@gmail.com
Whole thread Raw
In response to Re: Avoiding "will create implicit index" NOTICE  ("A. Kretschmer" <andreas.kretschmer@schollglas.com>)
List pgsql-sql
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.



pgsql-sql by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: dynamic columns in a query
Next
From: Richard Rosenberg
Date:
Subject: polymorphic function in 7.4 vs. 8.3