Search Postgresql Archives

Re: Moving Specific Data Across Schemas Including FKs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 4/23/15 1:08 PM, Raymond O'Donnell wrote:
What I am trying to figure out is that if I also have other relations
>that have foreign keys into the data I am moving, how would I also move
>the data from those relations and maintain the FK integrity?
I'd create the tables in the new schema without the FK constraints, copy
the data, then add the constraints afterwards.

You could also deffer the constraints, but that's probably going to be a lot slower.
--
Jim Nasby, Data Architect, Blue Treble Consulting
Data in Trouble? Get it in Treble! http://BlueTreble.com


--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux