Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 1BE6A636707 for ; Thu, 11 Jun 2009 13:05:43 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 10116-01-4 for ; Thu, 11 Jun 2009 13:05:40 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.230]) by mail.postgresql.org (Postfix) with ESMTP id 3CFFD636497 for ; Thu, 11 Jun 2009 13:05:40 -0300 (ADT) Received: by rv-out-0506.google.com with SMTP id l9so2786581rvb.3 for ; Thu, 11 Jun 2009 09:05:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=lwktonXH5LHm/IVu+w+27limyQUOd3Dxmu85kwsQzNo=; b=EHGuegp4wrXloGeRtRPqspNBlqcGNKV6EZgeDNGsRW1wb9OAWRh9FlGNQ/U/PWMU7U Gekw5uBUJ3W1bfldMjbC0Mnoq/ELfUAinP9xVDwFwNAEdqq1QJ/3Wuszvy7iZVzh6BqM iEzI+y3oN1SF3tOjpviY+0ST1XyOcTBNUg0GA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=ZFy7cA9kgHq1EpBYk3k+zQzOTPgj/v6BOpPRYxjRpHcCvs9Jl6Qkxlnx5GQBxzemDO 2eMv/+tsQEJTYFC9s6BlRGLz1ruw0kql0x4xpAMcA3N6zgIlNb4FqkSke4Ey+aglW44O WfdthF6UDoc06XxHF6xnGcgtJl+/9pf0v9i1c= Received: by 10.141.3.10 with SMTP id f10mr631875rvi.258.1244736337445; Thu, 11 Jun 2009 09:05:37 -0700 (PDT) Received: from ?172.16.1.231? ([208.187.158.94]) by mx.google.com with ESMTPS id b8sm618065rvf.54.2009.06.11.09.05.36 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 11 Jun 2009 09:05:37 -0700 (PDT) Message-ID: <4A312B53.7010000@gmail.com> Date: Thu, 11 Jun 2009 10:05:39 -0600 From: Rob Sargent User-Agent: Thunderbird 2.0.0.21 (X11/20090318) MIME-Version: 1.0 To: "A. Kretschmer" CC: pgsql-sql@postgresql.org Subject: Re: Avoiding "will create implicit index" NOTICE References: <4A242CC4.5000400@obviously.com> <5c4ddc540906011321v2162f928v451cca8833a44e20@mail.gmail.com> <4A30A239.8080700@obviously.com> <4A30AC42.1060709@obviously.com> <20090611073106.GB16593@a-kretschmer.de> In-Reply-To: <20090611073106.GB16593@a-kretschmer.de> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200906/54 X-Sequence-Number: 32659 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.