pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #6461: "-t" deletes primary key
5+ messages / 4 participants
[nested] [flat]

* BUG #6461: "-t" deletes primary key
@ 2012-02-17 10:41 lenka.piyush@gmail.com
  2012-02-17 17:01 ` Re: BUG #6461: "-t" deletes primary key Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 5+ messages in thread

From: lenka.piyush@gmail.com @ 2012-02-17 10:41 UTC (permalink / raw)
  To: pgsql-bugs

The following bug has been logged on the website:

Bug reference:      6461
Logged by:          Piyush
Email address:      lenka.piyush@gmail.com
PostgreSQL version: 9.1.2
Operating system:   Windows XP
Description:        

when i restore a particular table using pg_restore (using option "-t") it
doesn't restore my primary key... 




^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: BUG #6461: "-t" deletes primary key
  2012-02-17 10:41 BUG #6461: "-t" deletes primary key lenka.piyush@gmail.com
@ 2012-02-17 17:01 ` Tom Lane <tgl@sss.pgh.pa.us>
  2012-02-19 08:30   ` Re: BUG #6461: "-t" deletes primary key Peter Eisentraut <peter_e@gmx.net>
  0 siblings, 1 reply; 5+ messages in thread

From: Tom Lane @ 2012-02-17 17:01 UTC (permalink / raw)
  To: lenka.piyush@gmail.com; +Cc: pgsql-bugs

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.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: BUG #6461: "-t" deletes primary key
  2012-02-17 10:41 BUG #6461: "-t" deletes primary key lenka.piyush@gmail.com
  2012-02-17 17:01 ` Re: BUG #6461: "-t" deletes primary key Tom Lane <tgl@sss.pgh.pa.us>
@ 2012-02-19 08:30   ` Peter Eisentraut <peter_e@gmx.net>
  2012-02-19 11:25     ` Re: BUG #6461: "-t" deletes primary key Boszormenyi Zoltan <zb@cybertec.at>
  2012-02-19 16:50     ` Re: BUG #6461: "-t" deletes primary key Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 2 replies; 5+ messages in thread

From: Peter Eisentraut @ 2012-02-19 08:30 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: lenka.piyush@gmail.com; pgsql-bugs

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.




^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: BUG #6461: "-t" deletes primary key
  2012-02-17 10:41 BUG #6461: "-t" deletes primary key lenka.piyush@gmail.com
  2012-02-17 17:01 ` Re: BUG #6461: "-t" deletes primary key Tom Lane <tgl@sss.pgh.pa.us>
  2012-02-19 08:30   ` Re: BUG #6461: "-t" deletes primary key Peter Eisentraut <peter_e@gmx.net>
@ 2012-02-19 11:25     ` Boszormenyi Zoltan <zb@cybertec.at>
  1 sibling, 0 replies; 5+ messages in thread

From: Boszormenyi Zoltan @ 2012-02-19 11:25 UTC (permalink / raw)
  To: Peter Eisentraut <peter_e@gmx.net>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; lenka.piyush@gmail.com; pgsql-bugs

2012-02-19 09:30 keltezéssel, Peter Eisentraut írta:
> 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.

The associated sequence != indexes on the same table, but yes, it's a little annoying
sometimes.

> But from a user's perspective, that behavior seems kind of useless.
>
>


-- 
----------------------------------
Zoltán Böszörményi
Cybertec Schönig & Schönig GmbH
Gröhrmühlgasse 26
A-2700 Wiener Neustadt, Austria
Web: http://www.postgresql-support.de
     http://www.postgresql.at/




^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: BUG #6461: "-t" deletes primary key
  2012-02-17 10:41 BUG #6461: "-t" deletes primary key lenka.piyush@gmail.com
  2012-02-17 17:01 ` Re: BUG #6461: "-t" deletes primary key Tom Lane <tgl@sss.pgh.pa.us>
  2012-02-19 08:30   ` Re: BUG #6461: "-t" deletes primary key Peter Eisentraut <peter_e@gmx.net>
@ 2012-02-19 16:50     ` Tom Lane <tgl@sss.pgh.pa.us>
  1 sibling, 0 replies; 5+ messages in thread

From: Tom Lane @ 2012-02-19 16:50 UTC (permalink / raw)
  To: Peter Eisentraut <peter_e@gmx.net>; +Cc: lenka.piyush@gmail.com; pgsql-bugs

Peter Eisentraut <peter_e@gmx.net> 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



^ permalink  raw  reply  [nested|flat] 5+ messages in thread


end of thread, other threads:[~2012-02-19 16:50 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2012-02-17 10:41 BUG #6461: "-t" deletes primary key lenka.piyush@gmail.com
2012-02-17 17:01 ` Tom Lane <tgl@sss.pgh.pa.us>
2012-02-19 08:30   ` Peter Eisentraut <peter_e@gmx.net>
2012-02-19 11:25     ` Boszormenyi Zoltan <zb@cybertec.at>
2012-02-19 16:50     ` Tom Lane <tgl@sss.pgh.pa.us>

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