BUG #6461: "-t" deletes primary key
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...
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
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.
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/
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