Re: BUG #6461: "-t" deletes primary key

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: lenka(dot)piyush(at)gmail(dot)com, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #6461: "-t" deletes primary key
Date: 2012-02-19 16:50:15
Message-ID: 26918.1329670215@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> On fre, 2012-02-17 at 12:01 -0500, Tom Lane wrote:
>> lenka(dot)piyush(at)gmail(dot)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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message MauMau 2012-02-19 22:32:19 [Bug fix] postmaster always crashes on a debug version of Windows
Previous Message Boszormenyi Zoltan 2012-02-19 11:25:06 Re: BUG #6461: "-t" deletes primary key