Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id E7E1217BEC5 for ; Sun, 19 Feb 2012 12:50:35 -0400 (AST) Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Rz9y5-0000Wg-Ld for pgsql-bugs@postgresql.org; Sun, 19 Feb 2012 16:50:35 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id q1JGoFXn026919; Sun, 19 Feb 2012 11:50:15 -0500 (EST) To: Peter Eisentraut cc: lenka.piyush@gmail.com, pgsql-bugs@postgresql.org Subject: Re: BUG #6461: "-t" deletes primary key In-reply-to: <1329640232.13241.1.camel@vanquo.pezone.net> References: <28378.1329498117@sss.pgh.pa.us> <1329640232.13241.1.camel@vanquo.pezone.net> Comments: In-reply-to Peter Eisentraut message dated "Sun, 19 Feb 2012 10:30:32 +0200" Date: Sun, 19 Feb 2012 11:50:15 -0500 Message-ID: <26918.1329670215@sss.pgh.pa.us> From: Tom Lane X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201202/141 X-Sequence-Number: 32484 Peter Eisentraut writes: > On fre, 2012-02-17 at 12:01 -0500, Tom Lane wrote: >> lenka.piyush@gmail.com writes: >>> when i restore a particular table using pg_restore (using option "-t") it >>> doesn't restore my primary key... >> This is not a bug. -t selects the table only, not associated indexes. > But from a user's perspective, that behavior seems kind of useless. Well, I can see the possible usefulness of a switch that says "give me this table and all associated indexes/constraints" (other than FK constraints, likely). But it would be something new, not -t. regards, tom lane